Back to index

php5  5.3.10
ibase_blobs.c
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Authors: Ard Biesheuvel <a.k.biesheuvel@its.tudelft.nl>              |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 /* $Id: ibase_blobs.c 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include "config.h"
00023 #endif
00024 
00025 #include "php.h"
00026 
00027 #if HAVE_IBASE
00028 
00029 #include "php_interbase.h"
00030 #include "php_ibase_includes.h"
00031 
00032 #define BLOB_CLOSE          1
00033 #define BLOB_CANCEL         2
00034 
00035 static int le_blob;
00036 
00037 static void _php_ibase_free_blob(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
00038 {
00039        ibase_blob *ib_blob = (ibase_blob *)rsrc->ptr;
00040 
00041        if (ib_blob->bl_handle != NULL) { /* blob open*/
00042               if (isc_cancel_blob(IB_STATUS, &ib_blob->bl_handle)) {
00043                      _php_ibase_module_error("You can lose data. Close any blob after reading from or "
00044                             "writing to it. Use ibase_blob_close() before calling ibase_close()" TSRMLS_CC);
00045               }
00046        }
00047        efree(ib_blob);
00048 }
00049 /* }}} */
00050 
00051 void php_ibase_blobs_minit(INIT_FUNC_ARGS) /* {{{ */
00052 {
00053        le_blob = zend_register_list_destructors_ex(_php_ibase_free_blob, NULL, 
00054            "interbase blob", module_number);
00055 }
00056 /* }}} */
00057 
00058 int _php_ibase_string_to_quad(char const *id, ISC_QUAD *qd) /* {{{ */
00059 {
00060        /* shortcut for most common case */
00061        if (sizeof(ISC_QUAD) == sizeof(ISC_UINT64)) {
00062               return sscanf(id, BLOB_ID_MASK, (ISC_UINT64 *) qd);
00063        } else {
00064               ISC_UINT64 res;
00065               if (sscanf(id, BLOB_ID_MASK, &res)) {
00066                      qd->gds_quad_high = (ISC_LONG) (res >> 0x20);
00067                      qd->gds_quad_low = (ISC_LONG) (res & 0xFFFFFFFF);
00068                      return 1;
00069               }
00070               return 0;
00071        }
00072 }
00073 /* }}} */
00074 
00075 char *_php_ibase_quad_to_string(ISC_QUAD const qd) /* {{{ */
00076 {
00077        char *result;
00078 
00079        /* shortcut for most common case */
00080        if (sizeof(ISC_QUAD) == sizeof(ISC_UINT64)) {
00081               spprintf(&result, BLOB_ID_LEN+1, "0x%0*" LL_MASK "x", 16, *(ISC_UINT64*)(void *) &qd);
00082        } else {
00083               ISC_UINT64 res = ((ISC_UINT64) qd.gds_quad_high << 0x20) | qd.gds_quad_low;
00084               spprintf(&result, BLOB_ID_LEN+1, "0x%0*" LL_MASK "x", 16, res);
00085        }
00086        return result;
00087 }
00088 /* }}} */
00089 
00090 typedef struct { /* {{{ */
00091        ISC_LONG  max_segment;             /* Length of longest segment */
00092        ISC_LONG  num_segments;            /* Total number of segments */
00093        ISC_LONG  total_length;            /* Total length of blob */
00094        int             bl_stream;         /* blob is stream ? */
00095 /* }}} */
00096 } IBASE_BLOBINFO;
00097 
00098 int _php_ibase_blob_get(zval *return_value, ibase_blob *ib_blob, unsigned long max_len TSRMLS_DC) /* {{{ */
00099 {
00100        if (ib_blob->bl_qd.gds_quad_high || ib_blob->bl_qd.gds_quad_low) { /*not null ?*/
00101 
00102               ISC_STATUS stat;
00103               char *bl_data;
00104               unsigned long cur_len;
00105               unsigned short seg_len;
00106 
00107               bl_data = safe_emalloc(1, max_len, 1);
00108 
00109               for (cur_len = stat = 0; (stat == 0 || stat == isc_segment) && cur_len < max_len; cur_len += seg_len) {
00110 
00111                      unsigned short chunk_size = (max_len-cur_len) > USHRT_MAX ? USHRT_MAX
00112                             : (unsigned short)(max_len-cur_len);
00113 
00114                      stat = isc_get_segment(IB_STATUS, &ib_blob->bl_handle, &seg_len, chunk_size, &bl_data[cur_len]);
00115               }
00116 
00117               bl_data[cur_len] = '\0';
00118               if (IB_STATUS[0] == 1 && (stat != 0 && stat != isc_segstr_eof && stat != isc_segment)) {
00119                      efree(bl_data);
00120                      _php_ibase_error(TSRMLS_C);
00121                      return FAILURE;
00122               }
00123               RETVAL_STRINGL(bl_data, cur_len, 0);
00124        } else { /* null blob */
00125               RETVAL_STRING("", 1); /* empty string */
00126        }
00127        return SUCCESS;
00128 }
00129 /* }}} */
00130 
00131 int _php_ibase_blob_add(zval **string_arg, ibase_blob *ib_blob TSRMLS_DC) /* {{{ */
00132 {
00133        unsigned long put_cnt = 0, rem_cnt;
00134        unsigned short chunk_size;
00135 
00136        convert_to_string_ex(string_arg);
00137 
00138        for (rem_cnt = Z_STRLEN_PP(string_arg); rem_cnt > 0; rem_cnt -= chunk_size)  {
00139 
00140               chunk_size = rem_cnt > USHRT_MAX ? USHRT_MAX : (unsigned short)rem_cnt;
00141 
00142               if (isc_put_segment(IB_STATUS, &ib_blob->bl_handle, chunk_size, &Z_STRVAL_PP(string_arg)[put_cnt] )) {
00143                      _php_ibase_error(TSRMLS_C);
00144                      return FAILURE;
00145               }
00146               put_cnt += chunk_size;
00147        }
00148        return SUCCESS;
00149 }
00150 /* }}} */
00151 
00152 static int _php_ibase_blob_info(isc_blob_handle bl_handle, IBASE_BLOBINFO *bl_info TSRMLS_DC) /* {{{ */
00153 {
00154        static char bl_items[] = {
00155               isc_info_blob_num_segments,
00156               isc_info_blob_max_segment,
00157               isc_info_blob_total_length,
00158               isc_info_blob_type
00159        };
00160 
00161        char bl_inf[sizeof(long)*8], *p;
00162 
00163        bl_info->max_segment = 0;
00164        bl_info->num_segments = 0;
00165        bl_info->total_length = 0;
00166        bl_info->bl_stream = 0;
00167 
00168        if (isc_blob_info(IB_STATUS, &bl_handle, sizeof(bl_items), bl_items, sizeof(bl_inf), bl_inf)) {
00169               _php_ibase_error(TSRMLS_C);
00170               return FAILURE;
00171        }
00172 
00173        for (p = bl_inf; *p != isc_info_end && p < bl_inf + sizeof(bl_inf);) {
00174               unsigned short item_len;
00175               int item = *p++;
00176 
00177               item_len = (short) isc_vax_integer(p, 2);
00178               p += 2;
00179               switch (item) {
00180                      case isc_info_blob_num_segments:
00181                             bl_info->num_segments = isc_vax_integer(p, item_len);
00182                             break;
00183                      case isc_info_blob_max_segment:
00184                             bl_info->max_segment = isc_vax_integer(p, item_len);
00185                             break;
00186                      case isc_info_blob_total_length:
00187                             bl_info->total_length = isc_vax_integer(p, item_len);
00188                             break;
00189                      case isc_info_blob_type:
00190                             bl_info->bl_stream = isc_vax_integer(p, item_len);
00191                             break;
00192                      case isc_info_end:
00193                             break;
00194                      case isc_info_truncated:
00195                      case isc_info_error:  /* hmm. don't think so...*/
00196                             _php_ibase_module_error("PHP module internal error" TSRMLS_CC);
00197                             return FAILURE;
00198               } /* switch */
00199               p += item_len;
00200        } /* for */
00201        return SUCCESS;
00202 }
00203 /* }}} */
00204 
00205 /* {{{ proto resource ibase_blob_create([resource link_identifier])
00206    Create blob for adding data */
00207 PHP_FUNCTION(ibase_blob_create)
00208 {
00209        zval *link = NULL;
00210        ibase_db_link *ib_link;
00211        ibase_trans *trans = NULL;
00212        ibase_blob *ib_blob;
00213 
00214        RESET_ERRMSG;
00215 
00216        if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|r", &link)) {
00217               RETURN_FALSE;
00218        }
00219 
00220        PHP_IBASE_LINK_TRANS(link, ib_link, trans);
00221 
00222        ib_blob = (ibase_blob *) emalloc(sizeof(ibase_blob));
00223        ib_blob->bl_handle = NULL;
00224        ib_blob->type = BLOB_INPUT;
00225 
00226        if (isc_create_blob(IB_STATUS, &ib_link->handle, &trans->handle, &ib_blob->bl_handle, &ib_blob->bl_qd)) {
00227               _php_ibase_error(TSRMLS_C);
00228               efree(ib_blob);
00229               RETURN_FALSE;
00230        }
00231 
00232        ZEND_REGISTER_RESOURCE(return_value, ib_blob, le_blob);
00233 }
00234 /* }}} */
00235 
00236 /* {{{ proto resource ibase_blob_open([ resource link_identifier, ] string blob_id)
00237    Open blob for retrieving data parts */
00238 PHP_FUNCTION(ibase_blob_open)
00239 {
00240        char *blob_id;
00241        int blob_id_len;
00242        zval *link = NULL;
00243        ibase_db_link *ib_link;
00244        ibase_trans *trans = NULL;
00245        ibase_blob *ib_blob;
00246 
00247        RESET_ERRMSG;
00248 
00249        switch (ZEND_NUM_ARGS()) {
00250               default:
00251                      WRONG_PARAM_COUNT;
00252               case 1:
00253                      if (FAILURE == zend_parse_parameters(1 TSRMLS_CC, "s", &blob_id, &blob_id_len)) {
00254                             RETURN_FALSE;
00255                      }
00256                      break;
00257               case 2:
00258                      if (FAILURE == zend_parse_parameters(2 TSRMLS_CC, "rs", &link, &blob_id, &blob_id_len)) {
00259                             RETURN_FALSE;
00260                      }
00261                      break;
00262        }
00263 
00264        PHP_IBASE_LINK_TRANS(link, ib_link, trans);
00265 
00266        ib_blob = (ibase_blob *) emalloc(sizeof(ibase_blob));
00267        ib_blob->bl_handle = NULL;
00268        ib_blob->type = BLOB_OUTPUT;
00269 
00270        do {
00271               if (! _php_ibase_string_to_quad(blob_id, &ib_blob->bl_qd)) {
00272                      _php_ibase_module_error("String is not a BLOB ID" TSRMLS_CC);
00273                      break;
00274               }
00275 
00276               if (isc_open_blob(IB_STATUS, &ib_link->handle, &trans->handle, &ib_blob->bl_handle,
00277                             &ib_blob->bl_qd)) {
00278                      _php_ibase_error(TSRMLS_C);
00279                      break;
00280               }
00281 
00282               ZEND_REGISTER_RESOURCE(return_value, ib_blob, le_blob);
00283               return;
00284 
00285        } while (0);
00286 
00287        efree(ib_blob);
00288        RETURN_FALSE;
00289 }
00290 /* }}} */
00291 
00292 /* {{{ proto bool ibase_blob_add(resource blob_handle, string data)
00293    Add data into created blob */
00294 PHP_FUNCTION(ibase_blob_add)
00295 {
00296        zval **blob_arg, **string_arg;
00297        ibase_blob *ib_blob;
00298 
00299        RESET_ERRMSG;
00300 
00301        if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &blob_arg, &string_arg) == FAILURE) {
00302               WRONG_PARAM_COUNT;
00303        }
00304 
00305        ZEND_FETCH_RESOURCE(ib_blob, ibase_blob *, blob_arg, -1, "Interbase blob", le_blob);
00306 
00307        if (ib_blob->type != BLOB_INPUT) {
00308               _php_ibase_module_error("BLOB is not open for input" TSRMLS_CC);
00309               RETURN_FALSE;
00310        }
00311 
00312        if (_php_ibase_blob_add(string_arg, ib_blob TSRMLS_CC) != SUCCESS) {
00313               RETURN_FALSE;
00314        }
00315 }
00316 /* }}} */
00317 
00318 /* {{{ proto string ibase_blob_get(resource blob_handle, int len)
00319    Get len bytes data from open blob */
00320 PHP_FUNCTION(ibase_blob_get)
00321 {
00322        zval **blob_arg, **len_arg;
00323        ibase_blob *ib_blob;
00324 
00325        RESET_ERRMSG;
00326 
00327        if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &blob_arg, &len_arg) == FAILURE) {
00328               WRONG_PARAM_COUNT;
00329        }
00330 
00331        ZEND_FETCH_RESOURCE(ib_blob, ibase_blob *, blob_arg, -1, "Interbase blob", le_blob);
00332 
00333        if (ib_blob->type != BLOB_OUTPUT) {
00334               _php_ibase_module_error("BLOB is not open for output" TSRMLS_CC);
00335               RETURN_FALSE;
00336        }
00337 
00338        convert_to_long_ex(len_arg);
00339 
00340        if (_php_ibase_blob_get(return_value, ib_blob, Z_LVAL_PP(len_arg) TSRMLS_CC) != SUCCESS) {
00341               RETURN_FALSE;
00342        }
00343 }
00344 /* }}} */
00345 
00346 static void _php_ibase_blob_end(INTERNAL_FUNCTION_PARAMETERS, int bl_end) /* {{{ */
00347 {
00348        zval **blob_arg;
00349        ibase_blob *ib_blob;
00350 
00351        RESET_ERRMSG;
00352 
00353        if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &blob_arg) == FAILURE) {
00354               WRONG_PARAM_COUNT;
00355        }
00356 
00357        ZEND_FETCH_RESOURCE(ib_blob, ibase_blob *, blob_arg, -1, "Interbase blob", le_blob);
00358 
00359        if (bl_end == BLOB_CLOSE) { /* return id here */
00360 
00361               if (ib_blob->bl_qd.gds_quad_high || ib_blob->bl_qd.gds_quad_low) { /*not null ?*/
00362                      if (isc_close_blob(IB_STATUS, &ib_blob->bl_handle)) {
00363                             _php_ibase_error(TSRMLS_C);
00364                             RETURN_FALSE;
00365                      }
00366               }
00367               ib_blob->bl_handle = NULL;
00368 
00369               RETVAL_STRINGL(_php_ibase_quad_to_string(ib_blob->bl_qd), BLOB_ID_LEN, 0);
00370        } else { /* discard created blob */
00371               if (isc_cancel_blob(IB_STATUS, &ib_blob->bl_handle)) {
00372                      _php_ibase_error(TSRMLS_C);
00373                      RETURN_FALSE;
00374               }
00375               ib_blob->bl_handle = NULL;
00376               RETVAL_TRUE;
00377        }
00378        zend_list_delete(Z_LVAL_PP(blob_arg));
00379 }
00380 /* }}} */
00381 
00382 /* {{{ proto string ibase_blob_close(resource blob_handle)
00383    Close blob */
00384 PHP_FUNCTION(ibase_blob_close)
00385 {
00386        _php_ibase_blob_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, BLOB_CLOSE);
00387 }
00388 /* }}} */
00389 
00390 /* {{{ proto bool ibase_blob_cancel(resource blob_handle)
00391    Cancel creating blob */
00392 PHP_FUNCTION(ibase_blob_cancel)
00393 {
00394        _php_ibase_blob_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, BLOB_CANCEL);
00395 }
00396 /* }}} */
00397 
00398 /* {{{ proto array ibase_blob_info([ resource link_identifier, ] string blob_id)
00399    Return blob length and other useful info */
00400 PHP_FUNCTION(ibase_blob_info)
00401 {
00402        char *blob_id;
00403        int blob_id_len;
00404        zval *link = NULL;
00405        ibase_db_link *ib_link;
00406        ibase_trans *trans = NULL;
00407        ibase_blob ib_blob = { NULL, BLOB_INPUT };
00408        IBASE_BLOBINFO bl_info;
00409 
00410        RESET_ERRMSG;
00411 
00412        switch (ZEND_NUM_ARGS()) {
00413               default:
00414                      WRONG_PARAM_COUNT;
00415               case 1:
00416                      if (FAILURE == zend_parse_parameters(1 TSRMLS_CC, "s", &blob_id, &blob_id_len)) {
00417                             RETURN_FALSE;
00418                      }
00419                      break;
00420               case 2:
00421                      if (FAILURE == zend_parse_parameters(2 TSRMLS_CC, "rs", &link, &blob_id, &blob_id_len)) {
00422                             RETURN_FALSE;
00423                      }
00424                      break;
00425        }
00426 
00427        PHP_IBASE_LINK_TRANS(link, ib_link, trans);
00428 
00429        if (! _php_ibase_string_to_quad(blob_id, &ib_blob.bl_qd)) {
00430               _php_ibase_module_error("Unrecognized BLOB ID" TSRMLS_CC);
00431               RETURN_FALSE;
00432        }
00433 
00434        if (ib_blob.bl_qd.gds_quad_high || ib_blob.bl_qd.gds_quad_low) { /* not null ? */
00435               if (isc_open_blob(IB_STATUS, &ib_link->handle, &trans->handle, &ib_blob.bl_handle,
00436                             &ib_blob.bl_qd)) {
00437                      _php_ibase_error(TSRMLS_C);
00438                      RETURN_FALSE;
00439               }
00440 
00441               if (_php_ibase_blob_info(ib_blob.bl_handle, &bl_info TSRMLS_CC)) {
00442                      RETURN_FALSE;
00443               }
00444               if (isc_close_blob(IB_STATUS, &ib_blob.bl_handle)) {
00445                      _php_ibase_error(TSRMLS_C);
00446                      RETURN_FALSE;
00447               }
00448        } else { /* null blob, all values to zero */
00449               bl_info.max_segment = 0;
00450               bl_info.num_segments = 0;
00451               bl_info.total_length = 0;
00452               bl_info.bl_stream = 0;
00453        }
00454 
00455        array_init(return_value);
00456 
00457        add_index_long(return_value, 0, bl_info.total_length);
00458        add_assoc_long(return_value, "length", bl_info.total_length);
00459 
00460        add_index_long(return_value, 1, bl_info.num_segments);
00461        add_assoc_long(return_value, "numseg", bl_info.num_segments);
00462 
00463        add_index_long(return_value, 2, bl_info.max_segment);
00464        add_assoc_long(return_value, "maxseg", bl_info.max_segment);
00465 
00466        add_index_bool(return_value, 3, bl_info.bl_stream);
00467        add_assoc_bool(return_value, "stream", bl_info.bl_stream);
00468 
00469        add_index_bool(return_value, 4, (!ib_blob.bl_qd.gds_quad_high && !ib_blob.bl_qd.gds_quad_low));
00470        add_assoc_bool(return_value, "isnull", (!ib_blob.bl_qd.gds_quad_high && !ib_blob.bl_qd.gds_quad_low));
00471 }
00472 /* }}} */
00473 
00474 /* {{{ proto bool ibase_blob_echo([ resource link_identifier, ] string blob_id)
00475    Output blob contents to browser */
00476 PHP_FUNCTION(ibase_blob_echo)
00477 {
00478        char *blob_id;
00479        int blob_id_len;
00480        zval *link = NULL;
00481        ibase_db_link *ib_link;
00482        ibase_trans *trans = NULL;
00483        ibase_blob ib_blob_id = { NULL, BLOB_OUTPUT  };
00484        char bl_data[IBASE_BLOB_SEG];
00485        unsigned short seg_len;
00486 
00487        RESET_ERRMSG;
00488 
00489        switch (ZEND_NUM_ARGS()) {
00490               default:
00491                      WRONG_PARAM_COUNT;
00492               case 1:
00493                      if (FAILURE == zend_parse_parameters(1 TSRMLS_CC, "s", &blob_id, &blob_id_len)) {
00494                             RETURN_FALSE;
00495                      }
00496                      break;
00497               case 2:
00498                      if (FAILURE == zend_parse_parameters(2 TSRMLS_CC, "rs", &link, &blob_id, &blob_id_len)) {
00499                             RETURN_FALSE;
00500                      }
00501                      break;
00502        }
00503 
00504        PHP_IBASE_LINK_TRANS(link, ib_link, trans);
00505 
00506        if (! _php_ibase_string_to_quad(blob_id, &ib_blob_id.bl_qd)) {
00507               _php_ibase_module_error("Unrecognized BLOB ID" TSRMLS_CC);
00508               RETURN_FALSE;
00509        }
00510 
00511        do {
00512               if (isc_open_blob(IB_STATUS, &ib_link->handle, &trans->handle, &ib_blob_id.bl_handle,
00513                             &ib_blob_id.bl_qd)) {
00514                      break;
00515               }
00516 
00517               while (!isc_get_segment(IB_STATUS, &ib_blob_id.bl_handle, &seg_len, sizeof(bl_data), bl_data)
00518                             || IB_STATUS[1] == isc_segment) {
00519                      PHPWRITE(bl_data, seg_len);
00520               }
00521 
00522               if (IB_STATUS[0] && (IB_STATUS[1] != isc_segstr_eof)) {
00523                      break;
00524               }
00525 
00526               if (isc_close_blob(IB_STATUS, &ib_blob_id.bl_handle)) {
00527                      break;
00528               }
00529               RETURN_TRUE;
00530        } while (0);
00531 
00532        _php_ibase_error(TSRMLS_C);
00533        RETURN_FALSE;
00534 }
00535 /* }}} */
00536 
00537 /* {{{ proto string ibase_blob_import([ resource link_identifier, ] resource file)
00538    Create blob, copy file in it, and close it */
00539 PHP_FUNCTION(ibase_blob_import)
00540 {
00541        zval *link = NULL, *file;
00542        int size;
00543        unsigned short b;
00544        ibase_blob ib_blob = { NULL, 0 };
00545        ibase_db_link *ib_link;
00546        ibase_trans *trans = NULL;
00547        char bl_data[IBASE_BLOB_SEG];
00548        php_stream *stream;
00549 
00550        RESET_ERRMSG;
00551 
00552        if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|r",
00553                      (ZEND_NUM_ARGS()-1) ? &link : &file, &file)) {
00554               RETURN_FALSE;
00555        }
00556 
00557        PHP_IBASE_LINK_TRANS(link, ib_link, trans);
00558 
00559        php_stream_from_zval(stream, &file);
00560 
00561        do {
00562               if (isc_create_blob(IB_STATUS, &ib_link->handle, &trans->handle, &ib_blob.bl_handle,
00563                             &ib_blob.bl_qd)) {
00564                      break;
00565               }
00566 
00567               for (size = 0; (b = php_stream_read(stream, bl_data, sizeof(bl_data))); size += b) {
00568                      if (isc_put_segment(IB_STATUS, &ib_blob.bl_handle, b, bl_data)) {
00569                             break;
00570                      }
00571               }
00572 
00573               if (isc_close_blob(IB_STATUS, &ib_blob.bl_handle)) {
00574                      break;
00575               }
00576               RETURN_STRINGL( _php_ibase_quad_to_string(ib_blob.bl_qd), BLOB_ID_LEN, 0);
00577        } while (0);
00578 
00579        _php_ibase_error(TSRMLS_C);
00580        RETURN_FALSE;
00581 }
00582 /* }}} */
00583 
00584 #endif /* HAVE_IBASE */
00585 
00586 /*
00587  * Local variables:
00588  * tab-width: 4
00589  * c-basic-offset: 4
00590  * End:
00591  * vim600: sw=4 ts=4 fdm=marker
00592  * vim<600: sw=4 ts=4
00593  */