diff --git a/doc/conf.py b/doc/conf.py index 3d2bd2572..3ec600a48 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -29,7 +29,7 @@ # General information about the project. project = u'aerospike' -copyright = u'2014-2015, Aerospike' +copyright = u'2014-2016, Aerospike' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/examples/admin/change_password.py b/examples/admin/change_password.py index 73b01ac34..63443c8c9 100644 --- a/examples/admin/change_password.py +++ b/examples/admin/change_password.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/create_role.py b/examples/admin/create_role.py index 86d1d3d82..667902b77 100644 --- a/examples/admin/create_role.py +++ b/examples/admin/create_role.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/create_user.py b/examples/admin/create_user.py index 702c2adb0..d3a14835c 100644 --- a/examples/admin/create_user.py +++ b/examples/admin/create_user.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/drop_role.py b/examples/admin/drop_role.py index ff91fc160..68f8c0ef3 100644 --- a/examples/admin/drop_role.py +++ b/examples/admin/drop_role.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/drop_user.py b/examples/admin/drop_user.py index 19cb3da58..773ff77d2 100644 --- a/examples/admin/drop_user.py +++ b/examples/admin/drop_user.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/grant_privileges.py b/examples/admin/grant_privileges.py index 9d0c85268..bd83c7679 100644 --- a/examples/admin/grant_privileges.py +++ b/examples/admin/grant_privileges.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/grant_roles.py b/examples/admin/grant_roles.py index dab648f70..bec1d9d0b 100644 --- a/examples/admin/grant_roles.py +++ b/examples/admin/grant_roles.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/query_role.py b/examples/admin/query_role.py index 803d311e3..10a9bbcf1 100644 --- a/examples/admin/query_role.py +++ b/examples/admin/query_role.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/query_roles.py b/examples/admin/query_roles.py index 99be81919..f24160a2c 100644 --- a/examples/admin/query_roles.py +++ b/examples/admin/query_roles.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/query_user.py b/examples/admin/query_user.py index 6e6166b52..494ef2a6e 100644 --- a/examples/admin/query_user.py +++ b/examples/admin/query_user.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/query_users.py b/examples/admin/query_users.py index 080fbfec1..729a6f20e 100644 --- a/examples/admin/query_users.py +++ b/examples/admin/query_users.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/revoke_privileges.py b/examples/admin/revoke_privileges.py index db5c9a43c..14ff6cd52 100644 --- a/examples/admin/revoke_privileges.py +++ b/examples/admin/revoke_privileges.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/revoke_roles.py b/examples/admin/revoke_roles.py index d512f1df5..49c32806f 100644 --- a/examples/admin/revoke_roles.py +++ b/examples/admin/revoke_roles.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/admin/set_password.py b/examples/admin/set_password.py index 6b86730aa..951684b65 100644 --- a/examples/admin/set_password.py +++ b/examples/admin/set_password.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/client/index_create.py b/examples/client/index_create.py index cea174b46..5a3dd8ff0 100644 --- a/examples/client/index_create.py +++ b/examples/client/index_create.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ########################################################################## -# Copyright 2013-20156 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/setup.py b/setup.py index ee8846517..701b85492 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ################################################################################ -# Copyright 2013-2015 Aerospike, Inc. +# Copyright 2013-2016 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/include/conversions.h b/src/include/conversions.h index 5c53142a9..1976970c5 100644 --- a/src/include/conversions.h +++ b/src/include/conversions.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/exception_types.h b/src/include/exception_types.h index 5752b6760..d630d67ec 100644 --- a/src/include/exception_types.h +++ b/src/include/exception_types.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/exceptions.h b/src/include/exceptions.h index ca8d1f3d0..229586516 100644 --- a/src/include/exceptions.h +++ b/src/include/exceptions.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/geo.h b/src/include/geo.h index 79f05d02f..a1c028c5c 100644 --- a/src/include/geo.h +++ b/src/include/geo.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/global_hosts.h b/src/include/global_hosts.h index bdbd67d7e..118e2ef5f 100644 --- a/src/include/global_hosts.h +++ b/src/include/global_hosts.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/llist.h b/src/include/llist.h index 8c1bfe923..058ac3272 100644 --- a/src/include/llist.h +++ b/src/include/llist.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/log.h b/src/include/log.h index 5154fb1c8..4d967db91 100644 --- a/src/include/log.h +++ b/src/include/log.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/module_functions.h b/src/include/module_functions.h index 38a2fc962..19ceb2019 100644 --- a/src/include/module_functions.h +++ b/src/include/module_functions.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/nullobject.h b/src/include/nullobject.h index d4cea4e0a..829ad97af 100644 --- a/src/include/nullobject.h +++ b/src/include/nullobject.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/policy.h b/src/include/policy.h index 036f2c48f..30af585bd 100644 --- a/src/include/policy.h +++ b/src/include/policy.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/predicates.h b/src/include/predicates.h index 55281a016..5ec0244ef 100644 --- a/src/include/predicates.h +++ b/src/include/predicates.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/query.h b/src/include/query.h index e815a486c..70aca3601 100644 --- a/src/include/query.h +++ b/src/include/query.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/scan.h b/src/include/scan.h index e14146399..eaab78717 100644 --- a/src/include/scan.h +++ b/src/include/scan.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/serializer.h b/src/include/serializer.h index 283217280..56801fd12 100644 --- a/src/include/serializer.h +++ b/src/include/serializer.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include/types.h b/src/include/types.h index c0e9ff130..ba43a8027 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/calc_digest.c b/src/main/calc_digest.c index ad6efa00d..467c66b77 100644 --- a/src/main/calc_digest.c +++ b/src/main/calc_digest.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/client/admin.c b/src/main/client/admin.c index bdeb565f1..ca5c08fb3 100644 --- a/src/main/client/admin.c +++ b/src/main/client/admin.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -120,9 +120,9 @@ PyObject * AerospikeClient_Admin_Create_User(AerospikeClient * self, PyObject *a } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_create_user(self->as, &err, admin_policy_p, user, password, (const char**)roles, roles_size); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS if(err.code != AEROSPIKE_OK) { as_error_update(&err, err.code, NULL); goto CLEANUP; @@ -210,9 +210,9 @@ PyObject * AerospikeClient_Admin_Drop_User( AerospikeClient *self, PyObject *arg user = PyString_AsString(py_user); //Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_drop_user(self->as, &err, admin_policy_p, user); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS char *alias_to_search = NULL; alias_to_search = return_search_string(self->as); @@ -317,9 +317,9 @@ PyObject * AerospikeClient_Admin_Set_Password( AerospikeClient *self, PyObject * password = PyString_AsString(py_password); // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_set_password( self->as, &err, admin_policy_p, user, password ); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS if(err.code != AEROSPIKE_OK) { as_error_update(&err, err.code, NULL); goto CLEANUP; @@ -411,9 +411,9 @@ PyObject * AerospikeClient_Admin_Change_Password( AerospikeClient *self, PyObjec password = PyString_AsString(py_password); // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_change_password( self->as, &err, admin_policy_p, user, password ); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS char *alias_to_search = NULL; alias_to_search = return_search_string(self->as); @@ -528,9 +528,9 @@ PyObject * AerospikeClient_Admin_Grant_Roles( AerospikeClient *self, PyObject *a } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_grant_roles(self->as, &err, admin_policy_p, user, (const char**)roles, roles_size); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS if(err.code != AEROSPIKE_OK) { as_error_update(&err, err.code, NULL); goto CLEANUP; @@ -640,9 +640,9 @@ PyObject * AerospikeClient_Admin_Revoke_Roles( AerospikeClient *self, PyObject * } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_revoke_roles(self->as, &err, admin_policy_p, user, (const char**)roles, roles_size); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS if(err.code != AEROSPIKE_OK) { as_error_update(&err, err.code, NULL); goto CLEANUP; @@ -733,9 +733,9 @@ PyObject * AerospikeClient_Admin_Query_User( AerospikeClient * self, PyObject * user_name = PyString_AsString(py_user_name); // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_query_user(self->as, &err, admin_policy_p, user_name, &user); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS if(err.code != AEROSPIKE_OK) { as_error_update(&err, err.code, NULL); goto CLEANUP; @@ -822,9 +822,9 @@ PyObject * AerospikeClient_Admin_Query_Users( AerospikeClient * self, PyObject * } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_query_users(self->as, &err, admin_policy_p, &users, &users_size); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS if(err.code != AEROSPIKE_OK) { as_error_update(&err, err.code, err.message); goto CLEANUP; @@ -927,9 +927,9 @@ PyObject * AerospikeClient_Admin_Create_Role(AerospikeClient * self, PyObject *a } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_create_role(self->as, &err, admin_policy_p, role, privileges, privileges_size); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS CLEANUP: if(privileges) { @@ -1010,9 +1010,9 @@ PyObject * AerospikeClient_Admin_Drop_Role(AerospikeClient * self, PyObject *arg } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_drop_role(self->as, &err, admin_policy_p, role); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS CLEANUP: if ( err.code != AEROSPIKE_OK ) { @@ -1103,9 +1103,9 @@ PyObject * AerospikeClient_Admin_Grant_Privileges(AerospikeClient * self, PyObje } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_grant_privileges(self->as, &err, admin_policy_p, role, privileges, privileges_size); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS CLEANUP: if(privileges) { @@ -1203,9 +1203,9 @@ PyObject * AerospikeClient_Admin_Revoke_Privileges(AerospikeClient * self, PyObj } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_revoke_privileges(self->as, &err, admin_policy_p, role, privileges, privileges_size); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS CLEANUP: if(privileges) { @@ -1290,9 +1290,9 @@ PyObject * AerospikeClient_Admin_Query_Role(AerospikeClient * self, PyObject *ar } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_query_role(self->as, &err, admin_policy_p, role, &ret_role); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS if ( err.code != AEROSPIKE_OK ) { goto CLEANUP; } @@ -1371,9 +1371,9 @@ PyObject * AerospikeClient_Admin_Query_Roles(AerospikeClient * self, PyObject *a } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_query_roles(self->as, &err, admin_policy_p, &ret_role, &ret_role_size); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS if ( err.code != AEROSPIKE_OK ) { goto CLEANUP; } diff --git a/src/main/client/exists.c b/src/main/client/exists.c index 921520d25..848923902 100644 --- a/src/main/client/exists.c +++ b/src/main/client/exists.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -84,9 +84,9 @@ extern PyObject * AerospikeClient_Exists_Invoke( } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_key_exists(self->as, &err, read_policy_p, &key, &rec); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS if ( err.code == AEROSPIKE_OK ) { diff --git a/src/main/client/get.c b/src/main/client/get.c index 5009c2564..c004cb7b2 100644 --- a/src/main/client/get.c +++ b/src/main/client/get.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/client/get_key_digest.c b/src/main/client/get_key_digest.c index ddeac9520..04722b095 100644 --- a/src/main/client/get_key_digest.c +++ b/src/main/client/get_key_digest.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/client/get_many.c b/src/main/client/get_many.c index 24ce84dd8..44fc10fb1 100644 --- a/src/main/client/get_many.c +++ b/src/main/client/get_many.c @@ -158,23 +158,23 @@ static bool batch_get_cb(const as_batch_read* results, uint32_t n, void* udata) */ static void batch_get_recs(AerospikeClient *self, as_error *err, as_batch_read_records* records, PyObject **py_recs) { - as_vector* list = &records->list; - for (uint32_t i = 0; i < list->size; i++) { - as_batch_read_record* batch = as_vector_get(list, i); + as_vector* list = &records->list; + for (uint32_t i = 0; i < list->size; i++) { + as_batch_read_record* batch = as_vector_get(list, i); PyObject * rec = NULL; - PyObject * py_rec = NULL; + PyObject * py_rec = NULL; PyObject * p_key = NULL; - py_rec = PyTuple_New(3); - p_key = PyTuple_New(4); + py_rec = PyTuple_New(3); + p_key = PyTuple_New(4); - if ( batch->key.ns && strlen(batch->key.ns) > 0 ) { - PyTuple_SetItem(p_key, 0, PyString_FromString(batch->key.ns)); - } + if ( batch->key.ns && strlen(batch->key.ns) > 0 ) { + PyTuple_SetItem(p_key, 0, PyString_FromString(batch->key.ns)); + } - if ( batch->key.set && strlen(batch->key.set) > 0 ) { - PyTuple_SetItem(p_key, 1, PyString_FromString(batch->key.set)); - } + if ( batch->key.set && strlen(batch->key.set) > 0 ) { + PyTuple_SetItem(p_key, 1, PyString_FromString(batch->key.set)); + } if(batch->key.valuep) { switch(((as_val*)(batch->key.valuep))->type){ @@ -194,29 +194,29 @@ static void batch_get_recs(AerospikeClient *self, as_error *err, as_batch_read_r } if (batch->key.digest.init) { - PyTuple_SetItem(p_key, 3, PyByteArray_FromStringAndSize((char *) batch->key.digest.value, AS_DIGEST_VALUE_SIZE)); - } + PyTuple_SetItem(p_key, 3, PyByteArray_FromStringAndSize((char *) batch->key.digest.value, AS_DIGEST_VALUE_SIZE)); + } - PyTuple_SetItem(py_rec, 0, p_key); + PyTuple_SetItem(py_rec, 0, p_key); if ( batch->result == AEROSPIKE_OK ){ - record_to_pyobject(self, err, &batch->record, &batch->key, &rec); - PyObject *py_obj = PyTuple_GetItem(rec, 1); - Py_INCREF(py_obj); - PyTuple_SetItem(py_rec, 1, py_obj); - py_obj = PyTuple_GetItem(rec, 2); - Py_INCREF(py_obj); - PyTuple_SetItem(py_rec, 2, py_obj); - PyList_SetItem( *py_recs, i, py_rec); - Py_DECREF(rec); - } else if (batch->result == AEROSPIKE_ERR_RECORD_NOT_FOUND) { - Py_INCREF(Py_None); - PyTuple_SetItem(py_rec, 1, Py_None); - Py_INCREF(Py_None); - PyTuple_SetItem(py_rec, 2, Py_None); - PyList_SetItem( *py_recs, i, py_rec); - } - } + record_to_pyobject(self, err, &batch->record, &batch->key, &rec); + PyObject *py_obj = PyTuple_GetItem(rec, 1); + Py_INCREF(py_obj); + PyTuple_SetItem(py_rec, 1, py_obj); + py_obj = PyTuple_GetItem(rec, 2); + Py_INCREF(py_obj); + PyTuple_SetItem(py_rec, 2, py_obj); + PyList_SetItem( *py_recs, i, py_rec); + Py_DECREF(rec); + } else if (batch->result == AEROSPIKE_ERR_RECORD_NOT_FOUND) { + Py_INCREF(Py_None); + PyTuple_SetItem(py_rec, 1, Py_None); + Py_INCREF(Py_None); + PyTuple_SetItem(py_rec, 2, Py_None); + PyList_SetItem( *py_recs, i, py_rec); + } + } } /** ******************************************************************************************************* @@ -234,26 +234,26 @@ static PyObject * batch_get_aerospike_batch_read(as_error *err, AerospikeClient { PyObject * py_recs = NULL; - as_batch_read_records records; + as_batch_read_records records; // Initialisation flags bool batch_initialised = false; - as_batch_read_record* record = NULL; + as_batch_read_record* record = NULL; // Convert python keys list to as_key ** and add it to as_batch.keys // keys can be specified in PyList or PyTuple if ( py_keys != NULL && PyList_Check(py_keys) ) { Py_ssize_t size = PyList_Size(py_keys); - py_recs = PyList_New(size); - if (size > MAX_STACK_ALLOCATION) { - as_batch_read_init(&records, size); - } else { - as_batch_read_inita(&records, size); - } + py_recs = PyList_New(size); + if (size > MAX_STACK_ALLOCATION) { + as_batch_read_init(&records, size); + } else { + as_batch_read_inita(&records, size); + } - // Batch object initialised - batch_initialised = true; + // Batch object initialised + batch_initialised = true; for ( int i = 0; i < size; i++ ) { @@ -264,10 +264,10 @@ static PyObject * batch_get_aerospike_batch_read(as_error *err, AerospikeClient goto CLEANUP; } - record = as_batch_read_reserve(&records); + record = as_batch_read_reserve(&records); pyobject_to_key(err, py_key, &record->key); - record->read_all_bins = true; + record->read_all_bins = true; if ( err->code != AEROSPIKE_OK ) { goto CLEANUP; @@ -277,14 +277,14 @@ static PyObject * batch_get_aerospike_batch_read(as_error *err, AerospikeClient else if ( py_keys != NULL && PyTuple_Check(py_keys) ) { Py_ssize_t size = PyTuple_Size(py_keys); - py_recs = PyList_New(size); - if (size > MAX_STACK_ALLOCATION) { - as_batch_read_init(&records, size); - } else { - as_batch_read_inita(&records, size); - } - // Batch object initialised - batch_initialised = true; + py_recs = PyList_New(size); + if (size > MAX_STACK_ALLOCATION) { + as_batch_read_init(&records, size); + } else { + as_batch_read_inita(&records, size); + } + // Batch object initialised + batch_initialised = true; for ( int i = 0; i < size; i++ ) { PyObject * py_key = PyTuple_GetItem(py_keys, i); @@ -294,10 +294,10 @@ static PyObject * batch_get_aerospike_batch_read(as_error *err, AerospikeClient goto CLEANUP; } - record = as_batch_read_reserve(&records); + record = as_batch_read_reserve(&records); pyobject_to_key(err, py_key, &record->key); - record->read_all_bins = true; + record->read_all_bins = true; if ( err->code != AEROSPIKE_OK ) { goto CLEANUP; @@ -310,24 +310,24 @@ static PyObject * batch_get_aerospike_batch_read(as_error *err, AerospikeClient } // Invoke C-client API - Py_BEGIN_ALLOW_THREADS - aerospike_batch_read(self->as, err, batch_policy_p, &records); - Py_END_ALLOW_THREADS - if (err->code != AEROSPIKE_OK) - { + Py_BEGIN_ALLOW_THREADS + aerospike_batch_read(self->as, err, batch_policy_p, &records); + Py_END_ALLOW_THREADS + if (err->code != AEROSPIKE_OK) + { goto CLEANUP; - } - batch_get_recs(self, err, &records, &py_recs); - + } + batch_get_recs(self, err, &records, &py_recs); + CLEANUP: - if (batch_initialised == true){ - // We should destroy batch object as we are using 'as_batch_init' for initialisation - // Also, pyobject_to_key is soing strdup() in case of Unicode. So, object destruction - // is necessary. - as_batch_read_destroy(&records); - } - - return py_recs; + if (batch_initialised == true){ + // We should destroy batch object as we are using 'as_batch_init' for initialisation + // Also, pyobject_to_key is soing strdup() in case of Unicode. So, object destruction + // is necessary. + as_batch_read_destroy(&records); + } + + return py_recs; } /** ******************************************************************************************************* @@ -345,22 +345,22 @@ static PyObject * batch_get_aerospike_batch_get(as_error *err, AerospikeClient * { PyObject * py_recs = NULL; - LocalData data; - data.client = self; - as_batch batch; - bool batch_initialised = false; + LocalData data; + data.client = self; + as_batch batch; + bool batch_initialised = false; // Convert python keys list to as_key ** and add it to as_batch.keys // keys can be specified in PyList or PyTuple if ( py_keys != NULL && PyList_Check(py_keys) ) { Py_ssize_t size = PyList_Size(py_keys); - py_recs = PyList_New(size); - data.py_recs = py_recs; - as_batch_init(&batch, size); + py_recs = PyList_New(size); + data.py_recs = py_recs; + as_batch_init(&batch, size); - // Batch object initialised - batch_initialised = true; + // Batch object initialised + batch_initialised = true; for ( int i = 0; i < size; i++ ) { @@ -371,7 +371,7 @@ static PyObject * batch_get_aerospike_batch_get(as_error *err, AerospikeClient * goto CLEANUP; } - pyobject_to_key(err, py_key, as_batch_keyat(&batch, i)); + pyobject_to_key(err, py_key, as_batch_keyat(&batch, i)); if ( err->code != AEROSPIKE_OK ) { goto CLEANUP; @@ -381,11 +381,11 @@ static PyObject * batch_get_aerospike_batch_get(as_error *err, AerospikeClient * else if ( py_keys != NULL && PyTuple_Check(py_keys) ) { Py_ssize_t size = PyTuple_Size(py_keys); - py_recs = PyList_New(size); - data.py_recs = py_recs; - as_batch_init(&batch, size); - // Batch object initialised - batch_initialised = true; + py_recs = PyList_New(size); + data.py_recs = py_recs; + as_batch_init(&batch, size); + // Batch object initialised + batch_initialised = true; for ( int i = 0; i < size; i++ ) { PyObject * py_key = PyTuple_GetItem(py_keys, i); @@ -395,7 +395,7 @@ static PyObject * batch_get_aerospike_batch_get(as_error *err, AerospikeClient * goto CLEANUP; } - pyobject_to_key(err, py_key, as_batch_keyat(&batch, i)); + pyobject_to_key(err, py_key, as_batch_keyat(&batch, i)); if ( err->code != AEROSPIKE_OK ) { goto CLEANUP; @@ -408,21 +408,21 @@ static PyObject * batch_get_aerospike_batch_get(as_error *err, AerospikeClient * } // Invoke C-client API - Py_BEGIN_ALLOW_THREADS - aerospike_batch_get(self->as, err, batch_policy_p, - &batch, (aerospike_batch_read_callback) batch_get_cb, - &data); - Py_END_ALLOW_THREADS - + Py_BEGIN_ALLOW_THREADS + aerospike_batch_get(self->as, err, batch_policy_p, + &batch, (aerospike_batch_read_callback) batch_get_cb, + &data); + Py_END_ALLOW_THREADS + CLEANUP: - if (batch_initialised == true){ - // We should destroy batch object as we are using 'as_batch_init' for initialisation - // Also, pyobject_to_key is soing strdup() in case of Unicode. So, object destruction - // is necessary. - as_batch_destroy(&batch); - } - - return py_recs; + if (batch_initialised == true){ + // We should destroy batch object as we are using 'as_batch_init' for initialisation + // Also, pyobject_to_key is soing strdup() in case of Unicode. So, object destruction + // is necessary. + as_batch_destroy(&batch); + } + + return py_recs; } /** ******************************************************************************************************* @@ -448,7 +448,7 @@ PyObject * AerospikeClient_Get_Many_Invoke( as_error err; as_policy_batch policy; as_policy_batch * batch_policy_p = NULL; - bool has_batch_index = false; + bool has_batch_index = false; // Initialize error as_error_init(&err); @@ -470,13 +470,13 @@ PyObject * AerospikeClient_Get_Many_Invoke( goto CLEANUP; } - has_batch_index = aerospike_has_batch_index(self->as); - if (has_batch_index && !(self->as->config.policies.batch.use_batch_direct)) { - py_recs = batch_get_aerospike_batch_read(&err, self, py_keys, batch_policy_p); - } else { - py_recs = batch_get_aerospike_batch_get(&err, self, py_keys, batch_policy_p); - } - + has_batch_index = aerospike_has_batch_index(self->as); + if (has_batch_index && !(self->as->config.policies.batch.use_batch_direct)) { + py_recs = batch_get_aerospike_batch_read(&err, self, py_keys, batch_policy_p); + } else { + py_recs = batch_get_aerospike_batch_get(&err, self, py_keys, batch_policy_p); + } + CLEANUP: if ( err.code != AEROSPIKE_OK ) { PyObject * py_err = NULL; diff --git a/src/main/client/llist.c b/src/main/client/llist.c index 907829166..0d871b30a 100644 --- a/src/main/client/llist.c +++ b/src/main/client/llist.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/client/remove.c b/src/main/client/remove.c index fc6d573a2..bb7bf8fe5 100644 --- a/src/main/client/remove.c +++ b/src/main/client/remove.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -90,10 +90,10 @@ PyObject * AerospikeClient_Remove_Invoke( remove_policy_p->generation = (uint16_t) PyInt_AsLong(py_gen); } else if ( PyLong_Check(py_gen) ) { remove_policy_p->generation = (uint16_t) PyLong_AsLongLong(py_gen); - if((uint16_t)-1 == remove_policy_p->generation) { - as_error_update(&err, AEROSPIKE_ERR_PARAM, "integer value for gen exceeds sys.maxsize"); - goto CLEANUP; - } + if((uint16_t)-1 == remove_policy_p->generation) { + as_error_update(&err, AEROSPIKE_ERR_PARAM, "integer value for gen exceeds sys.maxsize"); + goto CLEANUP; + } } else { as_error_update(&err, AEROSPIKE_ERR_PARAM, "Generation should be an int or long"); } @@ -103,9 +103,9 @@ PyObject * AerospikeClient_Remove_Invoke( } // Invoke operation - Py_BEGIN_ALLOW_THREADS + Py_BEGIN_ALLOW_THREADS aerospike_key_remove(self->as, &err, remove_policy_p, &key); - Py_END_ALLOW_THREADS + Py_END_ALLOW_THREADS if(err.code != AEROSPIKE_OK) { as_error_update(&err, err.code, NULL); } diff --git a/src/main/conversions.c b/src/main/conversions.c index 6d5562c66..f01281fcf 100644 --- a/src/main/conversions.c +++ b/src/main/conversions.c @@ -125,7 +125,7 @@ as_status as_user_array_to_pyobject( as_error *err, as_user **users, PyObject ** PyObject * py_users = PyDict_New(); for(i = 0; i < users_size; i++) { - PyObject * py_user = PyString_FromString(users[i]->name); + PyObject * py_user = PyString_FromString(users[i]->name); PyObject * py_roles; strArray_to_pyobject(err, users[i]->roles, &py_roles, users[i]->roles_size); if( err->code != AEROSPIKE_OK) { @@ -460,7 +460,7 @@ as_status pyobject_to_val(AerospikeClient * self, as_error * err, PyObject * py_ * Returns AEROSPIKE_OK on success. On error, the err argument is populated. */ as_status pyobject_to_record(AerospikeClient * self, as_error * err, PyObject * py_rec, PyObject * py_meta, - as_record * rec, int serializer_type, as_static_pool *static_pool) + as_record * rec, int serializer_type, as_static_pool *static_pool) { as_error_reset(err); PyObject * py_result = NULL; diff --git a/src/main/exception.c b/src/main/exception.c index d2da896a7..43a731f87 100644 --- a/src/main/exception.c +++ b/src/main/exception.c @@ -229,7 +229,7 @@ PyObject * AerospikeException_New(void) Py_DECREF(py_index_dict); py_code = PyInt_FromLong(AEROSPIKE_ERR_INDEX); PyObject_SetAttrString(exceptions_array.IndexError, "code", py_code); - Py_DECREF(py_code); + Py_DECREF(py_code); PyModule_AddObject(module, "IndexError", exceptions_array.IndexError); count = sizeof(index_array.index_exceptions)/sizeof(index_array.index_exceptions[0]); diff --git a/src/main/geospatial/dumps.c b/src/main/geospatial/dumps.c index 8753832eb..74dc9d79a 100644 --- a/src/main/geospatial/dumps.c +++ b/src/main/geospatial/dumps.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,34 +28,34 @@ PyObject * AerospikeGeospatial_DoDumps(PyObject *geo_data, as_error *err) { - PyObject *initresult = NULL; + PyObject *initresult = NULL; - PyObject* sysmodules = PyImport_GetModuleDict(); - PyObject* json_module = NULL; + PyObject* sysmodules = PyImport_GetModuleDict(); + PyObject* json_module = NULL; if (PyMapping_HasKeyString(sysmodules, "json")) { - json_module = PyMapping_GetItemString(sysmodules, "json"); + json_module = PyMapping_GetItemString(sysmodules, "json"); } else { - json_module = PyImport_ImportModule("json"); - } + json_module = PyImport_ImportModule("json"); + } if (!json_module) { - /* insert error handling here! and exit this function */ + /* insert error handling here! and exit this function */ as_error_update(err, AEROSPIKE_ERR_CLIENT, "Unable to load json module"); } else { - PyObject *py_funcname = PyString_FromString("dumps"); - Py_INCREF(json_module); - initresult = PyObject_CallMethodObjArgs(json_module, py_funcname, geo_data, NULL); - Py_DECREF(json_module); - Py_DECREF(py_funcname); - } + PyObject *py_funcname = PyString_FromString("dumps"); + Py_INCREF(json_module); + initresult = PyObject_CallMethodObjArgs(json_module, py_funcname, geo_data, NULL); + Py_DECREF(json_module); + Py_DECREF(py_funcname); + } - return initresult; + return initresult; } PyObject * AerospikeGeospatial_Dumps(AerospikeGeospatial * self, PyObject * args, PyObject * kwds) { - PyObject *initresult = NULL; + PyObject *initresult = NULL; // Aerospike error object as_error err; // Initialize error object @@ -67,10 +67,10 @@ PyObject * AerospikeGeospatial_Dumps(AerospikeGeospatial * self, PyObject * args } initresult = AerospikeGeospatial_DoDumps(self->geo_data, &err); - if(!initresult) { - as_error_update(&err, AEROSPIKE_ERR_CLIENT, "Unable to call dumps function"); + if(!initresult) { + as_error_update(&err, AEROSPIKE_ERR_CLIENT, "Unable to call dumps function"); goto CLEANUP; - } + } CLEANUP: diff --git a/src/main/geospatial/type.c b/src/main/geospatial/type.c index 83f4245b1..458095815 100644 --- a/src/main/geospatial/type.c +++ b/src/main/geospatial/type.c @@ -204,7 +204,7 @@ PyObject* AerospikeGeospatial_Type_Str(self) AerospikeGeospatial* self; Py_DECREF(py_err); return NULL; } - return initresult; + return initresult; } static void AerospikeGeospatial_Type_Dealloc(AerospikeGeospatial * self) { diff --git a/src/main/geospatial/unwrap.c b/src/main/geospatial/unwrap.c index 201866a12..044eb4e5f 100644 --- a/src/main/geospatial/unwrap.c +++ b/src/main/geospatial/unwrap.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,6 +58,6 @@ PyObject * AerospikeGeospatial_Unwrap(AerospikeGeospatial * self, PyObject * arg Py_DECREF(py_err); return NULL; } - Py_INCREF(self->geo_data); - return self->geo_data; + Py_INCREF(self->geo_data); + return self->geo_data; } diff --git a/src/main/geospatial/wrap.c b/src/main/geospatial/wrap.c index c8851e9af..f80019cb7 100644 --- a/src/main/geospatial/wrap.c +++ b/src/main/geospatial/wrap.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,7 @@ PyObject * AerospikeGeospatial_Wrap(AerospikeGeospatial * self, PyObject * args, goto CLEANUP; } - store_geodata(self, &err, py_geodata); + store_geodata(self, &err, py_geodata); CLEANUP: @@ -62,7 +62,7 @@ PyObject * AerospikeGeospatial_Wrap(AerospikeGeospatial * self, PyObject * args, return NULL; } - Py_INCREF(self->geo_data); + Py_INCREF(self->geo_data); return PyLong_FromLong(0); } diff --git a/src/main/llist/llist_operations.c b/src/main/llist/llist_operations.c index d4af8067a..c0e3eedb9 100644 --- a/src/main/llist/llist_operations.c +++ b/src/main/llist/llist_operations.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/log.c b/src/main/log.c index 4164dad99..8c809a2e2 100644 --- a/src/main/log.c +++ b/src/main/log.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/query/foreach.c b/src/main/query/foreach.c index 8c4d5a70b..90cffeb0b 100644 --- a/src/main/query/foreach.c +++ b/src/main/query/foreach.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ typedef struct { as_error error; PyObject * callback; - AerospikeClient * client; + AerospikeClient * client; } LocalData; @@ -116,7 +116,7 @@ PyObject * AerospikeQuery_Foreach(AerospikeQuery * self, PyObject * args, PyObje // Initialize callback user data LocalData data; data.callback = py_callback; - data.client = self->client; + data.client = self->client; as_error_init(&data.error); // Aerospike Client Arguments diff --git a/src/main/query/results.c b/src/main/query/results.c index 998c850ed..7c2a32b05 100644 --- a/src/main/query/results.c +++ b/src/main/query/results.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,7 @@ typedef struct { PyObject * py_results; - AerospikeClient * client; + AerospikeClient * client; } LocalData; static bool each_result(const as_val * val, void * udata) @@ -44,7 +44,7 @@ static bool each_result(const as_val * val, void * udata) } PyObject * py_results = NULL; - LocalData *data = (LocalData *) udata; + LocalData *data = (LocalData *) udata; py_results = data->py_results; PyObject * py_result = NULL; @@ -86,7 +86,7 @@ PyObject * AerospikeQuery_Results(AerospikeQuery * self, PyObject * args, PyObje static char * kwlist[] = {"policy", NULL}; LocalData data; - data.client = self->client; + data.client = self->client; if ( PyArg_ParseTupleAndKeywords(args, kwds, "|O:results", kwlist, &py_policy) == false ) { return NULL; @@ -123,7 +123,7 @@ PyObject * AerospikeQuery_Results(AerospikeQuery * self, PyObject * args, PyObje PyThreadState * _save = PyEval_SaveThread(); TRACE(); - aerospike_query_foreach(self->client->as, &err, query_policy_p, &self->query, each_result, &data); + aerospike_query_foreach(self->client->as, &err, query_policy_p, &self->query, each_result, &data); TRACE(); PyEval_RestoreThread(_save); diff --git a/src/main/scan/foreach.c b/src/main/scan/foreach.c index 0dcb05733..5c53e73aa 100644 --- a/src/main/scan/foreach.c +++ b/src/main/scan/foreach.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ typedef struct { as_error error; PyObject * callback; - AerospikeClient * client; + AerospikeClient * client; } LocalData; @@ -145,8 +145,8 @@ PyObject * AerospikeScan_Foreach(AerospikeScan * self, PyObject * args, PyObject if (py_options && PyDict_Check(py_options)) { set_scan_options(&err, &self->scan, py_options); if(err.code != AEROSPIKE_OK) { - goto CLEANUP; - } + goto CLEANUP; + } } // We are spawning multiple threads diff --git a/src/main/scan/results.c b/src/main/scan/results.c index 18d5db064..f40a23a09 100644 --- a/src/main/scan/results.c +++ b/src/main/scan/results.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2013-2015 Aerospike, Inc. + * Copyright 2013-2016 Aerospike, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ typedef struct { PyObject * py_results; - AerospikeClient * client; + AerospikeClient * client; } LocalData; static bool each_result(const as_val * val, void * udata) @@ -43,7 +43,7 @@ static bool each_result(const as_val * val, void * udata) } PyObject * py_results = NULL; - LocalData *data = (LocalData *) udata; + LocalData *data = (LocalData *) udata; py_results = data->py_results; PyObject * py_result = NULL; @@ -72,7 +72,7 @@ PyObject * AerospikeScan_Results(AerospikeScan * self, PyObject * args, PyObject as_policy_scan * scan_policy_p = NULL; LocalData data; - data.client = self->client; + data.client = self->client; static char * kwlist[] = {"policy", NULL}; if ( PyArg_ParseTupleAndKeywords(args, kwds, "|O:results", kwlist, &py_policy) == false ) { @@ -100,7 +100,7 @@ PyObject * AerospikeScan_Results(AerospikeScan * self, PyObject * args, PyObject } py_results = PyList_New(0); - data.py_results = py_results; + data.py_results = py_results; PyThreadState * _save = PyEval_SaveThread();