REBOL3 tracker
  0.9.12 beta
Ticket #0001823 User: anonymous

Project:



rss
TypeWish Statusbuilt Date13-Jan-2011 23:06
Versionalpha 111 CategoryHost-Kit Submitted byoldes
PlatformAll Severityminor Prioritynormal

Summary RL_MAKE_BINARY macro in a host-kit
Description Can we have RL_MAKE_BINARY macro as we have RL_MAKE_STRING?

Or is it enough to create a binary using something like:

const int val = RXA_INT64(frm, 1);
REBSER *ser = RL_MAKE_STRING(2, FALSE);
RL_SET_CHAR(ser, 0, val );
RL_SET_CHAR(ser, 1, val >> 8);
RXA_SERIES(frm, 1) = ser;
RXA_TYPE(frm, 1) = RXT_BINARY;
return RXR_VALUE;
Example code

			

Assigned ton/a Fixed inalpha 111 Last Update17-Feb-2011 16:53


Comments
(0003019)
Kaj
14-Jan-2011 19:01

I'm using the technique you mention in the cURL binding and it works.
(0003060)
Carl
30-Jan-2011 22:23

RL_MAKE_STRING(size, FALSE) makes a binary. The doc for the function has been updated.

This define has been added:

#define RL_MAKE_BINARY(s) RL_MAKE_STRING(s, FALSE)

Date User Field Action Change
17-Feb-2011 16:57 oldes Comment : 0003117 Removed -
17-Feb-2011 16:53 oldes Comment : 0003117 Added -
30-Jan-2011 22:23 carl Comment : 0003060 Added -
30-Jan-2011 22:20 carl Fixedin Modified => alpha 111
30-Jan-2011 22:20 carl Status Modified reviewed => built
17-Jan-2011 04:18 carl Description Modified -
17-Jan-2011 04:18 carl Status Modified submitted => reviewed
14-Jan-2011 19:01 Kaj Comment : 0003019 Added -
13-Jan-2011 23:06 oldes Ticket Added -