Skip to content

Commit

Permalink
Merge pull request #27 from lstrojny/feature/whitespace-cleanup
Browse files Browse the repository at this point in the history
Removing trailing whitespace
  • Loading branch information
lstrojny committed Nov 14, 2012
2 parents 7e0dc3d + 6240fbf commit d1add82
Show file tree
Hide file tree
Showing 14 changed files with 324 additions and 324 deletions.
26 changes: 13 additions & 13 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
--------------------------------------------------------------------
--------------------------------------------------------------------
The PHP License, version 3.01
Copyright (c) 1999 - 2012 The PHP Group. All rights reserved.
--------------------------------------------------------------------
--------------------------------------------------------------------

Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact group@php.net.

4. Products derived from this software may not be called "PHP", nor
may "PHP" appear in their name, without prior written permission
from group@php.net. You may indicate that your software works in
conjunction with PHP by saying "Foo for PHP" instead of calling
it "PHP Foo" or "phpfoo"

5. The PHP Group may publish revised and/or new versions of the
license from time to time. Each version will be given a
distinguishing version number.
Expand All @@ -41,27 +41,27 @@ are met:
"This product includes PHP software, freely available from
<http://www.php.net/software/>".

THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------
--------------------------------------------------------------------

This software consists of voluntary contributions made by many
individuals on behalf of the PHP Group.

The PHP Group can be contacted via Email at group@php.net.

For more information on the PHP Group and the PHP project,
For more information on the PHP Group and the PHP project,
please see <http://www.php.net>.

PHP includes the Zend Engine, freely available at
Expand Down
38 changes: 19 additions & 19 deletions amqp.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,35 +96,35 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_reconnect, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_getLogin, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_getLogin, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_setLogin, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_setLogin, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, login)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_getPassword, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_getPassword, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_setPassword, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, password)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_getHost, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_getHost, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_setHost, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, host)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_getPort, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_getPort, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_setPort, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, port)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_getVhost, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_getVhost, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_connection_class_setVhost, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1)
Expand Down Expand Up @@ -432,7 +432,7 @@ zend_function_entry amqp_queue_class_functions[] = {

PHP_ME(amqp_queue_class, getName, arginfo_amqp_queue_class_getName, ZEND_ACC_PUBLIC)
PHP_ME(amqp_queue_class, setName, arginfo_amqp_queue_class_setName, ZEND_ACC_PUBLIC)

PHP_ME(amqp_queue_class, getFlags, arginfo_amqp_queue_class_getFlags, ZEND_ACC_PUBLIC)
PHP_ME(amqp_queue_class, setFlags, arginfo_amqp_queue_class_setFlags, ZEND_ACC_PUBLIC)

Expand Down Expand Up @@ -547,14 +547,14 @@ void amqp_error(amqp_rpc_reply_t x, char ** pstr)
case AMQP_RESPONSE_NORMAL:
return;

case AMQP_RESPONSE_NONE:
case AMQP_RESPONSE_NONE:
spprintf(pstr, 0, "Missing RPC reply type.");
break;

case AMQP_RESPONSE_LIBRARY_EXCEPTION:
spprintf(pstr, 0, "Library error: %s", amqp_error_string(x.library_error));
break;

case AMQP_RESPONSE_SERVER_EXCEPTION:
switch (x.reply.id) {
case AMQP_CONNECTION_CLOSE_METHOD: {
Expand Down Expand Up @@ -614,9 +614,9 @@ amqp_table_t *convert_zval_to_arguments(zval *zvalArguments)
HashPosition pos;
zval **data;
amqp_table_t *arguments;

argumentHash = Z_ARRVAL_P(zvalArguments);

/* In setArguments, we are overwriting all the existing values */
arguments = (amqp_table_t *)emalloc(sizeof(amqp_table_t));

Expand All @@ -637,24 +637,24 @@ amqp_table_t *convert_zval_to_arguments(zval *zvalArguments)
amqp_table_entry_t *table;
amqp_field_value_t *field;


/* Make a copy of the value: */
value = **data;
zval_copy_ctor(&value);

/* Now pull the key */

if (zend_hash_get_current_key_ex(argumentHash, &key, &key_len, &index, 0, &pos) != HASH_KEY_IS_STRING) {
/* Skip things that are not strings */
continue;
}

/* Build the value */
table = &arguments->entries[arguments->num_entries++];
field = &table->value;
strKey = estrndup(key, key_len);
table->key = amqp_cstring_bytes(strKey);

switch (Z_TYPE_P(&value)) {
case IS_BOOL:
field->kind = AMQP_FIELD_KIND_BOOLEAN;
Expand All @@ -676,7 +676,7 @@ amqp_table_t *convert_zval_to_arguments(zval *zvalArguments)
default:
continue;
}

/* Clean up the zval */
zval_dtor(&value);
}
Expand All @@ -703,7 +703,7 @@ PHP_MINIT_FUNCTION(amqp)

/* Set up the connection resource */
le_amqp_connection_resource = zend_register_list_destructors_ex(NULL, NULL, PHP_AMQP_CONNECTION_RES_NAME, module_number);

INIT_CLASS_ENTRY(ce, "AMQPConnection", amqp_connection_class_functions);
ce.create_object = amqp_connection_ctor;
amqp_connection_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
Expand All @@ -723,7 +723,7 @@ PHP_MINIT_FUNCTION(amqp)
INIT_CLASS_ENTRY(ce, "AMQPEnvelope", amqp_envelope_class_functions);
ce.create_object = amqp_envelope_ctor;
amqp_envelope_class_entry = zend_register_internal_class(&ce TSRMLS_CC);

/* Class Exceptions */
INIT_CLASS_ENTRY(ce, "AMQPException", NULL);
amqp_exception_class_entry = zend_register_internal_class_ex(&ce, (zend_class_entry*)zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
Expand Down
Loading

0 comments on commit d1add82

Please sign in to comment.