Advertisement
kaaposc

SQLAnywhere PHP module for PHP 5.4.?

Jul 5th, 2012
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.49 KB | None | 0 0
  1. --- sqlanywhere.c.orig  2012-07-05 12:41:25.895562111 +0300
  2. +++ sqlanywhere.c   2012-07-05 12:56:58.913548583 +0300
  3. @@ -1075,13 +1075,13 @@
  4.      if( persistent ||
  5.         hashed_details_length == strlen( sasql_HASH_STR ) + 1 ) {
  6.  
  7. -   list_entry * le = NULL;
  8. +   zend_rsrc_list_entry * le = NULL;
  9.  
  10.     /* try to find if we already have this link in our persistent list */
  11.     if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1,
  12.             (void **) &le)==FAILURE) {
  13.         /* we don't */
  14. -       list_entry new_le;
  15. +       zend_rsrc_list_entry new_le;
  16.  
  17.         if( SAG(max_conns) != -1 &&
  18.             SAG(num_conns) >= SAG(max_conns)) {
  19. @@ -1141,7 +1141,7 @@
  20.         new_le.ptr  = sqlany_conn;
  21.         if( zend_hash_update(&EG(persistent_list), hashed_details,
  22.             hashed_details_length+1, (void *) &new_le,
  23. -           sizeof(list_entry),NULL)==FAILURE) {
  24. +           sizeof(zend_rsrc_list_entry),NULL)==FAILURE) {
  25.         api.sqlany_disconnect( sqlany_conn->handle );
  26.         api.sqlany_free_connection( sqlany_conn->handle );
  27.         efree( hashed_details );
  28. @@ -1171,7 +1171,7 @@
  29.     sqlany_conn->id = zend_list_insert(sqlany_conn, le_pconn);
  30.      } else {
  31.     /* ! persistent */
  32. -   list_entry * index_ptr, new_index_ptr;
  33. +   zend_rsrc_list_entry * index_ptr, new_index_ptr;
  34.     if (zend_hash_find(&EG(regular_list),hashed_details,hashed_details_length+1,
  35.             (void **) &index_ptr)==SUCCESS) {
  36.         int type;
  37. @@ -1240,7 +1240,7 @@
  38.     new_index_ptr.ptr  = (void *) Z_LVAL_P( return_value );
  39.     new_index_ptr.type = le_index_ptr;
  40.     if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1,
  41. -           (void *) &new_index_ptr, sizeof(list_entry),NULL)==FAILURE) {
  42. +           (void *) &new_index_ptr, sizeof(zend_rsrc_list_entry),NULL)==FAILURE) {
  43.         efree(hashed_details);
  44.         api.sqlany_disconnect( sqlany_conn->handle );
  45.         api.sqlany_free_connection( sqlany_conn->handle );
  46. @@ -1270,8 +1270,8 @@
  47.      void *sqlca;
  48.      sqlany_connection_t * sqlany_conn;
  49.      char * hashed_details = sasql_HASH_STR;
  50. -    list_entry new_le;
  51. -    list_entry * le = NULL;
  52. +    zend_rsrc_list_entry new_le;
  53. +    zend_rsrc_list_entry * le = NULL;
  54.  
  55.      if( !api.initialized ) {
  56.     php_error_docref(NULL TSRMLS_CC, E_WARNING, DBCAPI_NOT_FOUND_ERROR );
  57. @@ -1332,7 +1332,7 @@
  58.      new_le.ptr  = sqlany_conn;
  59.      if( zend_hash_update( &EG( persistent_list ), hashed_details,
  60.                            strlen( hashed_details ) + 1, (void *) &new_le,
  61. -                          sizeof( list_entry ), NULL ) == FAILURE ) {
  62. +                          sizeof( zend_rsrc_list_entry ), NULL ) == FAILURE ) {
  63.          /* we don't want to close the connection because it
  64.           * belongs to someone else */
  65.          api.sqlany_free_connection( sqlany_conn->handle );
  66. @@ -1357,7 +1357,7 @@
  67.  {
  68.      zval ** arg;
  69.      sqlany_connection_t * sqlany_conn;
  70. -    list_entry * le;
  71. +    zend_rsrc_list_entry * le;
  72.  
  73.      if( ( ZEND_NUM_ARGS() != 1) || (zend_get_parameters_array_ex(1,&arg) != SUCCESS )) {
  74.     WRONG_PARAM_COUNT;
  75. @@ -2169,7 +2169,7 @@
  76.         Z_ADDREF_P( tmp );
  77.         zend_hash_index_update( Z_ARRVAL_P(return_value),
  78.             i,
  79. -           (void *)&tmp, sizeof(pval*), NULL );
  80. +           (void *)&tmp, sizeof(zval*), NULL );
  81.     }
  82.     if( result_type & FETCH_OBJ ) {
  83.         a_sqlany_column_info cinfo;
  84. @@ -2180,7 +2180,7 @@
  85.         zend_hash_update( Z_ARRVAL_P(return_value),
  86.             cinfo.name,
  87.             strlen( cinfo.name ) + 1,
  88. -           (void *)&tmp, sizeof(pval*), NULL );
  89. +           (void *)&tmp, sizeof(zval*), NULL );
  90.     }
  91.      }
  92.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement