Skip to content

Commit

Permalink
Problem: C does not have namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
taotetek committed Mar 5, 2017
1 parent 61110a7 commit 35e6870
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions go/libmockdiscgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import "C"
import "fmt"

//export DiscoverEndpoints
func DiscoverEndpoints(url, key string) *C.char {
//export ZDiscgoDiscoverEndpoints
func ZDiscgoDiscoverEndpoints(url, key string) *C.char {
return C.CString(fmt.Sprintf("inproc://%s-%s", url, key))
}

Expand Down
2 changes: 1 addition & 1 deletion src/zdiscgoplugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ zdiscgoplugin_new (char *libpath)

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-pedantic"
self->discover = (char * (*)(go_str, go_str)) dlsym(self->handle, "DiscoverEndpoints");
self->discover = (char * (*)(go_str, go_str)) dlsym(self->handle, "ZDiscgoDiscoverEndpoints");
if (!self->discover)
return NULL;
#pragma GCC diagnostic pop
Expand Down

0 comments on commit 35e6870

Please sign in to comment.