Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Mar 7, 2013
2 parents ecc451a + dd1f824 commit f1a5b90
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions c-callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

/* for OPT_HEADERFUNCTION */
size_t header_function( char *ptr, size_t size, size_t nmemb, void *ctx) {
void *go_header_func = (void *)goGetCurlField((uintptr)ctx, "headerFunction");
GoInterface *userdata = (GoInterface *)goGetCurlField((uintptr)ctx, "headerData");
void *go_header_func = (void *)goGetCurlField((GoUintptr)ctx, "headerFunction");
GoInterface *userdata = (GoInterface *)goGetCurlField((GoUintptr)ctx, "headerData");

if (userdata == NULL) {
return goCallWriteFunctionCallback(go_header_func, ptr, size*nmemb, goNilInterface());
Expand All @@ -21,8 +21,8 @@ void *return_header_function() {

/* for OPT_WRITEFUNCTION */
size_t write_function( char *ptr, size_t size, size_t nmemb, void *ctx) {
void *go_write_func = (void *)goGetCurlField((uintptr)ctx, "writeFunction");
GoInterface *userdata = (GoInterface *)goGetCurlField((uintptr)ctx, "writeData");
void *go_write_func = (void *)goGetCurlField((GoUintptr)ctx, "writeFunction");
GoInterface *userdata = (GoInterface *)goGetCurlField((GoUintptr)ctx, "writeData");

if (userdata == NULL) {
return goCallWriteFunctionCallback(go_write_func, ptr, size*nmemb, goNilInterface());
Expand All @@ -36,8 +36,8 @@ void *return_write_function() {

/* for OPT_READFUNCTION */
size_t read_function( char *ptr, size_t size, size_t nmemb, void *ctx) {
void *go_read_func = (void *)goGetCurlField((uintptr)ctx, "readFunction");
GoInterface *userdata = (GoInterface *)goGetCurlField((uintptr)ctx, "readData");
void *go_read_func = (void *)goGetCurlField((GoUintptr)ctx, "readFunction");
GoInterface *userdata = (GoInterface *)goGetCurlField((GoUintptr)ctx, "readData");

if (userdata == NULL) {
return goCallReadFunctionCallback(go_read_func, ptr, size*nmemb, goNilInterface());
Expand All @@ -52,8 +52,8 @@ void *return_read_function() {

/* for OPT_PROGRESSFUNCTION */
int progress_function(void *ctx, double dltotal, double dlnow, double ultotal, double ulnow) {
void *go_progress_func = (void *)goGetCurlField((uintptr)ctx, "progressFunction");
GoInterface *clientp = (GoInterface *)goGetCurlField((uintptr)ctx, "progressData");
void *go_progress_func = (void *)goGetCurlField((GoUintptr)ctx, "progressFunction");
GoInterface *clientp = (GoInterface *)goGetCurlField((GoUintptr)ctx, "progressData");

if (clientp == NULL) {
return goCallProgressCallback(go_progress_func, goNilInterface(),
Expand Down

0 comments on commit f1a5b90

Please sign in to comment.