Lines Matching refs:ib_blob

37 	ibase_blob *ib_blob = (ibase_blob *)rsrc->ptr;  in _php_ibase_free_blob()  local
39 if (ib_blob->bl_handle != 0) { /* blob open*/ in _php_ibase_free_blob()
40 if (isc_cancel_blob(IB_STATUS, &ib_blob->bl_handle)) { in _php_ibase_free_blob()
45 efree(ib_blob); in _php_ibase_free_blob()
93 int _php_ibase_blob_get(zval *return_value, ibase_blob *ib_blob, zend_ulong max_len) /* {{{ */ in _php_ibase_blob_get() argument
95 if (ib_blob->bl_qd.gds_quad_high || ib_blob->bl_qd.gds_quad_low) { /*not null ?*/ in _php_ibase_blob_get()
109 …stat = isc_get_segment(IB_STATUS, &ib_blob->bl_handle, &seg_len, chunk_size, &ZSTR_VAL(bl_data)[cu… in _php_ibase_blob_get()
127 int _php_ibase_blob_add(zval *string_arg, ibase_blob *ib_blob) /* {{{ */ in _php_ibase_blob_add() argument
138 …if (isc_put_segment(IB_STATUS, &ib_blob->bl_handle, chunk_size, &Z_STRVAL_P(string_arg)[put_cnt] )… in _php_ibase_blob_add()
208 ibase_blob *ib_blob; in PHP_FUNCTION() local
218 ib_blob = (ibase_blob *) emalloc(sizeof(ibase_blob)); in PHP_FUNCTION()
219 ib_blob->bl_handle = 0; in PHP_FUNCTION()
220 ib_blob->type = BLOB_INPUT; in PHP_FUNCTION()
222 …if (isc_create_blob(IB_STATUS, &ib_link->handle, &trans->handle, &ib_blob->bl_handle, &ib_blob->bl… in PHP_FUNCTION()
224 efree(ib_blob); in PHP_FUNCTION()
228 RETVAL_RES(zend_register_resource(ib_blob, le_blob)); in PHP_FUNCTION()
242 ibase_blob *ib_blob; in PHP_FUNCTION() local
263 ib_blob = (ibase_blob *) emalloc(sizeof(ibase_blob)); in PHP_FUNCTION()
264 ib_blob->bl_handle = 0; in PHP_FUNCTION()
265 ib_blob->type = BLOB_OUTPUT; in PHP_FUNCTION()
268 if (! _php_ibase_string_to_quad(blob_id, &ib_blob->bl_qd)) { in PHP_FUNCTION()
273 if (isc_open_blob(IB_STATUS, &ib_link->handle, &trans->handle, &ib_blob->bl_handle, in PHP_FUNCTION()
274 &ib_blob->bl_qd)) { in PHP_FUNCTION()
279 RETVAL_RES(zend_register_resource(ib_blob, le_blob)); in PHP_FUNCTION()
285 efree(ib_blob); in PHP_FUNCTION()
295 ibase_blob *ib_blob; in PHP_FUNCTION() local
303 ib_blob = (ibase_blob *)zend_fetch_resource_ex(blob_arg, "Interbase blob", le_blob); in PHP_FUNCTION()
305 if (ib_blob->type != BLOB_INPUT) { in PHP_FUNCTION()
310 if (_php_ibase_blob_add(string_arg, ib_blob) != SUCCESS) { in PHP_FUNCTION()
322 ibase_blob *ib_blob; in PHP_FUNCTION() local
330 ib_blob = (ibase_blob *)zend_fetch_resource_ex(blob_arg, "Interbase blob", le_blob); in PHP_FUNCTION()
332 if (ib_blob->type != BLOB_OUTPUT) { in PHP_FUNCTION()
337 if (_php_ibase_blob_get(return_value, ib_blob, len_arg) != SUCCESS) { in PHP_FUNCTION()
346 ibase_blob *ib_blob; in _php_ibase_blob_end() local
354 ib_blob = (ibase_blob *)zend_fetch_resource_ex(blob_arg, "Interbase blob", le_blob); in _php_ibase_blob_end()
358 if (ib_blob->bl_qd.gds_quad_high || ib_blob->bl_qd.gds_quad_low) { /*not null ?*/ in _php_ibase_blob_end()
359 if (isc_close_blob(IB_STATUS, &ib_blob->bl_handle)) { in _php_ibase_blob_end()
364 ib_blob->bl_handle = 0; in _php_ibase_blob_end()
366 RETVAL_NEW_STR(_php_ibase_quad_to_string(ib_blob->bl_qd)); in _php_ibase_blob_end()
368 if (isc_cancel_blob(IB_STATUS, &ib_blob->bl_handle)) { in _php_ibase_blob_end()
372 ib_blob->bl_handle = 0; in _php_ibase_blob_end()
404 ibase_blob ib_blob = { 0, BLOB_INPUT }; in PHP_FUNCTION() local
426 if (! _php_ibase_string_to_quad(blob_id, &ib_blob.bl_qd)) { in PHP_FUNCTION()
431 if (ib_blob.bl_qd.gds_quad_high || ib_blob.bl_qd.gds_quad_low) { /* not null ? */ in PHP_FUNCTION()
432 if (isc_open_blob(IB_STATUS, &ib_link->handle, &trans->handle, &ib_blob.bl_handle, in PHP_FUNCTION()
433 &ib_blob.bl_qd)) { in PHP_FUNCTION()
438 if (_php_ibase_blob_info(ib_blob.bl_handle, &bl_info)) { in PHP_FUNCTION()
441 if (isc_close_blob(IB_STATUS, &ib_blob.bl_handle)) { in PHP_FUNCTION()
466 add_index_bool(return_value, 4, (!ib_blob.bl_qd.gds_quad_high && !ib_blob.bl_qd.gds_quad_low)); in PHP_FUNCTION()
467 …add_assoc_bool(return_value, "isnull", (!ib_blob.bl_qd.gds_quad_high && !ib_blob.bl_qd.gds_quad_lo… in PHP_FUNCTION()
541 ibase_blob ib_blob = { 0, 0 }; in PHP_FUNCTION() local
559 if (isc_create_blob(IB_STATUS, &ib_link->handle, &trans->handle, &ib_blob.bl_handle, in PHP_FUNCTION()
560 &ib_blob.bl_qd)) { in PHP_FUNCTION()
565 if (isc_put_segment(IB_STATUS, &ib_blob.bl_handle, b, bl_data)) { in PHP_FUNCTION()
570 if (isc_close_blob(IB_STATUS, &ib_blob.bl_handle)) { in PHP_FUNCTION()
573 RETURN_NEW_STR(_php_ibase_quad_to_string(ib_blob.bl_qd)); in PHP_FUNCTION()