Created
August 9, 2010 13:46
-
-
Save bcg/515433 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Volumes/Stuff/vessel-vala/ext/libmemcached/libmemcached_test.c: In function ‘_vala_main’: | |
/Volumes/Stuff/vessel-vala/ext/libmemcached/libmemcached_test.c:23: error: too many arguments to function ‘memcached_server_list_append’ | |
error: cc exited with status 256 | |
Compilation failed: 1 error(s), 0 warning(s) | |
make: *** [all] Error 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CCode( | |
cheader_filename = "libmemcached/memcached.h", | |
cprefix = "")] | |
namespace Memcached { | |
[CCode (cname = "memcached_return_t")] | |
public struct Return : int {} | |
public struct State { | |
bool is_allocated; | |
bool is_initialized; | |
bool sockaddr_inited; | |
bool is_shutting_down; | |
} | |
public struct Flags { | |
bool auto_eject_hosts; | |
bool binary_protocol; | |
bool buffer_requests; | |
bool cork; | |
bool hash_with_prefix_key; | |
bool ketama_weighted; | |
bool no_block; // Don't block | |
bool no_reply; | |
bool randomize_replica_read; | |
bool reuse_memory; | |
bool support_cas; | |
bool tcp_nodelay; | |
bool use_cache_lookups; | |
bool use_sort_hosts; | |
bool use_udp; | |
bool verify_key; | |
bool tcp_keepalive; | |
} | |
[CCode (cname = "struct memcached_server_st")] | |
public struct Server { | |
State state; | |
Flags flags; | |
} | |
[CCode (lower_case_cprefix = "memcached_server_list_")] | |
namespace ServerList { | |
[CCode (cname = "memcached_server_list_append")] | |
public Server append(Server servers, string hostname, int port, Return* error); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* libmemcached_test.c generated by valac, the Vala compiler | |
* generated from libmemcached_test.vala, do not modify */ | |
#include <glib.h> | |
#include <glib-object.h> | |
#include <libmemcached/memcached.h> | |
#include <string.h> | |
void _vala_main (void); | |
void _vala_main (void) { | |
memcached_return_t rc; | |
struct memcached_server_st server = {0}; | |
struct memcached_server_st _tmp0_ = {0}; | |
rc = (memcached_return_t) 0; | |
memset (&server, 0, sizeof (struct memcached_server_st)); | |
server = (memcached_server_list_append (&server, "test", 3333, &rc, &_tmp0_), _tmp0_); | |
} | |
int main (int argc, char ** argv) { | |
g_type_init (); | |
_vala_main (); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment