Hey:

On Mon, Jan 26, 2015 at 8:43 AM, Stanislav Malyshev <smalys...@gmail.com> wrote:
> Hi!
>
> With recent moving of string lengths to size_t, it looks like PDO APIs
> weren't updated. I.e.:
>
> typedef int (*pdo_stmt_get_col_data_func)(pdo_stmt_t *stmt, int colno,
> char **ptr, zend_ulong *len, int *caller_frees);
>
> This looks like len should be size_t, and in fact fetch_value() in
> pdo_stmt.c sends size_t parameter there, but since I'm not very familiar
> with PDO internals, I'd like to double check - is it an omission and
> will anything break if I change it to size_t?
I think it is okey,  of course you should change all related apis in
pdo_* drivers

thanks
>
> There are also other things, like:
>
>         const char              *driver_name;
>         zend_ulong      driver_name_len;
>
> typedef int (*pdo_dbh_prepare_func)(pdo_dbh_t *dbh, const char *sql,
> zend_long sql_len, pdo_stmt_t *stmt, zval *driver_options);
>
> typedef zend_long (*pdo_dbh_do_func)(pdo_dbh_t *dbh, const char *sql,
> zend_long sql_len);
>
> typedef int (*pdo_dbh_quote_func)(pdo_dbh_t *dbh, const char *unquoted,
> int unquotedlen, char **quoted, int *quotedlen, enum pdo_param_type
> paramtype);
>
> As you can see, sometimes length is an int, sometimes zend_long,
> sometimes zend_ulong. This looks like it needs some cleanup.
> --
> Stas Malyshev
> smalys...@gmail.com
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
Xinchen Hui
@Laruence
http://www.laruence.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to