@@ -23,8 +23,8 @@ static duk_ret_t duk__print_alert_helper(duk_context *ctx, FILE *fh) {
2323 * arguments, join them with a single space, and append a newline.
2424 */
2525
26- if (nargs == 1 && duk_is_buffer (ctx , 0 )) {
27- buf = (const duk_uint8_t * ) duk_get_buffer (ctx , 0 , & sz_buf );
26+ if (nargs == 1 && duk_is_buffer_data (ctx , 0 )) {
27+ buf = (const duk_uint8_t * ) duk_get_buffer_data (ctx , 0 , & sz_buf );
2828 fwrite ((const void * ) buf , 1 , (size_t ) sz_buf , fh );
2929 } else {
3030 duk_push_string (ctx , " " );
@@ -57,8 +57,8 @@ static duk_ret_t duk__print_alert_helper(duk_context *ctx, FILE *fh) {
5757 * arguments, join them with a single space, and append a newline.
5858 */
5959
60- if (nargs == 1 && duk_is_buffer (ctx , 0 )) {
61- buf = (const duk_uint8_t * ) duk_get_buffer (ctx , 0 , & sz_buf );
60+ if (nargs == 1 && duk_is_buffer_data (ctx , 0 )) {
61+ buf = (const duk_uint8_t * ) duk_get_buffer_data (ctx , 0 , & sz_buf );
6262 } else if (nargs > 0 ) {
6363 duk_idx_t i ;
6464 duk_size_t sz_str ;
0 commit comments