aboutsummaryrefslogtreecommitdiff
path: root/pdstring+wchar/src/bytes2any.c
diff options
context:
space:
mode:
authorBryan Jurish <mukau@users.sourceforge.net>2009-01-25 22:16:17 +0000
committerBryan Jurish <mukau@users.sourceforge.net>2009-01-25 22:16:17 +0000
commit9f6510850e3782a22b0ac282161f5e1e7413f3f2 (patch)
treede3c296e65faf6f4355f0fb345f4eed1b069d2bc /pdstring+wchar/src/bytes2any.c
parent2fca84eeb6f1079b1f8a0723f5d2b176aa1b62e3 (diff)
+ got 'wchars' objects working
svn path=/trunk/externals/moocow/; revision=10638
Diffstat (limited to 'pdstring+wchar/src/bytes2any.c')
-rw-r--r--pdstring+wchar/src/bytes2any.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/pdstring+wchar/src/bytes2any.c b/pdstring+wchar/src/bytes2any.c
index 81f28bd..e4b3715 100644
--- a/pdstring+wchar/src/bytes2any.c
+++ b/pdstring+wchar/src/bytes2any.c
@@ -32,7 +32,7 @@
#endif
#include "mooPdUtils.h"
-#include "pdstringUtils.c"
+#include "pdstringUtils.h"
/* black magic */
#ifdef NT
@@ -87,8 +87,8 @@ typedef struct _bytes2any
static void bytes2any_atoms(t_bytes2any *x, int argc, t_atom *argv)
{
t_pdstring_atoms src = {argv,argc,argc};
- pdstring_atoms2bytes(&(x->x_bytes), &src, x->x_eos);
- pdstring_bytes2any(NULL, &(x->x_bytes), x->x_binbuf);
+ pdstring_atoms2bytes(x, &(x->x_bytes), &src, x->x_eos);
+ pdstring_bytes2any(x, NULL, &(x->x_bytes), x->x_binbuf);
int x_argc;
t_atom *x_argv;
@@ -183,8 +183,7 @@ static void *bytes2any_new(MOO_UNUSED t_symbol *sel, int argc, t_atom *argv)
*/
static void bytes2any_free(t_bytes2any *x)
{
- if (x->x_bytes.b_buf)
- freebytes(x->x_bytes.b_buf, x->x_bytes.b_alloc*sizeof(unsigned char));
+ pdstring_bytes_clear(&x->x_bytes);
binbuf_free(x->x_binbuf);
inlet_free(x->x_eos_in);
outlet_free(x->x_outlet_done);