This patch fixes deprecated function errors and missing dependency in the 
control file.
diff -Nru u1db-0.1.4/src/u1db_http_sync_target.c u1db-0.1.4.mine/src/u1db_http_sync_target.c
--- u1db-0.1.4/src/u1db_http_sync_target.c	2012-09-26 17:35:34.000000000 +0000
+++ u1db-0.1.4.mine/src/u1db_http_sync_target.c	2014-06-25 15:05:42.951423246 +0000
@@ -458,7 +458,7 @@
         status = U1DB_NOMEM;
         goto finish;
     }
-    obj = json_object_object_get(json, "target_replica_uid");
+    json_object_object_get_ex(json, "target_replica_uid", &obj);
     if (obj == NULL) {
         status = U1DB_INVALID_HTTP_RESPONSE;
         goto finish;
@@ -482,13 +482,13 @@
         status = U1DB_NOMEM;
         goto finish;
     }
-    obj = json_object_object_get(json, "target_replica_generation");
+    json_object_object_get_ex(json, "target_replica_generation", &obj);
     if (obj == NULL) {
         status = U1DB_INVALID_HTTP_RESPONSE;
         goto finish;
     }
     *st_gen = json_object_get_int(obj);
-    obj = json_object_object_get(json, "target_replica_transaction_id");
+    json_object_object_get_ex(json, "target_replica_transaction_id", &obj);
     if (obj == NULL) {
         status = U1DB_INVALID_HTTP_RESPONSE;
         goto finish;
@@ -503,13 +503,13 @@
             goto finish;
         }
     }
-    obj = json_object_object_get(json, "source_replica_generation");
+    json_object_object_get_ex(json, "source_replica_generation", &obj);
     if (obj == NULL) {
         status = U1DB_INVALID_HTTP_RESPONSE;
         goto finish;
     }
     *source_gen = json_object_get_int(obj);
-    obj = json_object_object_get(json, "source_transaction_id");
+    json_object_object_get_ex(json, "source_transaction_id", &obj);
     if (obj == NULL) {
         *trans_id = NULL;
     } else {
@@ -920,14 +920,14 @@
         goto finish;
     }
     obj = json_object_array_get_idx(json, 0);
-    attr = json_object_object_get(obj, "new_generation");
+    json_object_object_get_ex(obj, "new_generation", &attr);
     if (attr == NULL) {
         //printf("broken 3\n");
         status = U1DB_BROKEN_SYNC_STREAM;
         goto finish;
     }
     *target_gen = json_object_get_int(attr);
-    attr = json_object_object_get(obj, "new_transaction_id");
+    json_object_object_get_ex(obj, "new_transaction_id", &attr);
     if (attr == NULL) {
         //printf("broken 4\n");
         status = U1DB_BROKEN_SYNC_STREAM;
@@ -946,7 +946,7 @@
     }
 
     if (autocreated_replica_uid != NULL) {
-        attr = json_object_object_get(obj, "replica_uid");
+        json_object_object_get_ex(obj, "replica_uid", &attr);
         if (attr != NULL) {
             tmp = json_object_get_string(attr);
             if (tmp == NULL) {
@@ -964,15 +964,15 @@
 
     for (i = 1; i < doc_count; ++i) {
         obj = json_object_array_get_idx(json, i);
-        attr = json_object_object_get(obj, "id");
+        json_object_object_get_ex(obj, "id", &attr);
         doc_id = json_object_get_string(attr);
-        attr = json_object_object_get(obj, "rev");
+        json_object_object_get_ex(obj, "rev", &attr);
         rev = json_object_get_string(attr);
-        attr = json_object_object_get(obj, "content");
+        json_object_object_get_ex(obj, "content", &attr);
         content = json_object_get_string(attr);
-        attr = json_object_object_get(obj, "gen");
+        json_object_object_get_ex(obj, "gen", &attr);
         gen = json_object_get_int(attr);
-        attr = json_object_object_get(obj, "trans_id");
+        json_object_object_get_ex(obj, "trans_id", &attr);
         trans_id = json_object_get_string(attr);
         status = u1db__allocate_document(doc_id, rev, content, 0, &doc);
         if (status != U1DB_OK)
diff -Nru u1db-0.1.4/src/u1db_query.c u1db-0.1.4.mine/src/u1db_query.c
--- u1db-0.1.4/src/u1db_query.c	2014-06-25 13:25:53.000000000 +0000
+++ u1db-0.1.4.mine/src/u1db_query.c	2014-06-25 15:28:59.381677937 +0000
@@ -306,7 +306,7 @@
     if (!json_object_is_type(obj, json_type_object)) {
         goto finish;
     }
-    val = json_object_object_get(obj, field->data);
+    json_object_object_get_ex(obj, field->data, &val);
     if (val == NULL)
         goto finish;
     if (field->next != NULL) {
diff -Nru u1db-0.1.4/debian/control u1db-0.1.4.mine/debian/control
--- u1db-0.1.4/debian/control	2013-06-23 18:15:07.000000000 +0000
+++ u1db-0.1.4.mine/debian/control	2014-06-25 13:28:45.218694460 +0000
@@ -20,7 +20,8 @@
  python-setuptools,
  python-simplejson,
  python-testscenarios,
- python-testtools
+ python-testtools,
+ pkg-config
 Maintainer: Micah Anderson <[email protected]>
 Standards-Version: 3.9.4
 X-Python-Version: >= 2.6

Attachment: signature.asc
Description: Digital signature



Reply via email to