Browse Source

make nsm.h (c)importable from zig

The zig cImport feature is not happy with the line 
`OSC_REPLY_ERR( r, ( out_msg ? out_msg : "") );`
because out_msg is a string list and "" is just a string.
pull/102/head
Benjamin Jurk GitHub 1 month ago
parent
commit
b8ab2ab672
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 4 deletions
  1. +14
    -4
      extras/nsm.h/nsm.h

+ 14
- 4
extras/nsm.h/nsm.h View File

@@ -486,8 +486,13 @@ NSM_EXPORT int _nsm_osc_open ( const char *path, const char *types, lo_arg **arg

int r = nsm->open( &argv[0]->s, &argv[1]->s, &argv[2]->s, &out_msg, nsm->open_userdata );

if ( r )
OSC_REPLY_ERR( r, ( out_msg ? out_msg : "") );
if ( r ) {
if ( out_msg == NULL) {
OSC_REPLY_ERR( r, "");
else {
OSC_REPLY_ERR( r, out_msg);
}
}
else
OSC_REPLY( "OK" );

@@ -513,8 +518,13 @@ NSM_EXPORT int _nsm_osc_save ( const char *path, const char *types, lo_arg **arg

int r = nsm->save(&out_msg, nsm->save_userdata );

if ( r )
OSC_REPLY_ERR( r, ( out_msg ? out_msg : "") );
if ( r ) {
if ( out_msg == NULL) {
OSC_REPLY_ERR( r, "");
else {
OSC_REPLY_ERR( r, out_msg);
}
}
else
OSC_REPLY( "OK" );



Loading…
Cancel
Save