#else
-#define spalloc_new0(type) malloc (sizeof (type))
-#define spalloc_alloc0(size) malloc (size)
+#define spalloc_new(type) malloc (sizeof (type))
+#define spalloc_alloc(size) malloc (size)
#define spalloc_free(type, buf) free (buf)
#define spalloc_free1(size, buf) free (buf)
ShmAllocBlock * shm_alloc_space_block_get (ShmAllocSpace * space,
unsigned long offset);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __SHMALLOC_H__ */
/* Returns the number of client this has successfully been sent to */
int
-sp_writer_send_buf (ShmPipe * self, gchar * buf, size_t size)
+sp_writer_send_buf (ShmPipe * self, char * buf, size_t size)
{
ShmArea *area = NULL;
unsigned long offset = 0;
cb.payload.new_shm_area.path_size, 0);
if (retval != cb.payload.new_shm_area.path_size) {
free (area_name);
- g_debug ("retval: %d, errno: %d", retval, errno);
return -3;
}
#include <sys/stat.h>
#include <fcntl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct _ShmClient ShmClient;
typedef struct _ShmPipe ShmPipe;
typedef struct _ShmBlock ShmBlock;
unsigned long sp_client_recv (ShmPipe * self, char **buf);
int sp_client_recv_finish (ShmPipe * self, char *buf);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __SHMPIPE_H__ */