The R Project SVN R-packages

Rev

Rev 7747 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7747 Rev 7986
Line 19... Line 19...
19
RCurl_addMemoryAllocation(CURLoption opt, const void *data, CURL *curl)
19
RCurl_addMemoryAllocation(CURLoption opt, const void *data, CURL *curl)
20
{
20
{
21
	RCurlMemory *el;
21
	RCurlMemory *el;
22
	el = (RCurlMemory *) malloc(sizeof(RCurlMemory));
22
	el = (RCurlMemory *) malloc(sizeof(RCurlMemory));
23
	if(!el) {
23
	if(!el) {
24
		PROBLEM "Can't allocate space for RCurlMemory structure."
24
	    Rf_error("Can't allocate space for RCurlMemory structure.");
25
		ERROR;
-
 
26
	}
25
	}
27
	el->data = data;
26
	el->data = data;
28
	el->option = opt;
27
	el->option = opt;
29
	el->type = VOID_TYPE;
28
	el->type = VOID_TYPE;
30
	el->curl = curl;
29
	el->curl = curl;
Line 105... Line 104...
105
#endif
104
#endif
106
 
105
 
107
    if(!mgr) {
106
    if(!mgr) {
108
#if 0
107
#if 0
109
/* This is okay as we may not have needed to protected it. */
108
/* This is okay as we may not have needed to protected it. */
110
	    PROBLEM "CURL object (%p) that is not handled in the RCurl memory management system.", (void*)curl
109
	Rf_warning("CURL object (%p) that is not handled in the RCurl memory management system.", (void*)curl);
111
	    WARN;
-
 
112
#endif
110
#endif
113
	    return;
111
	    return;
114
    }
112
    }
115
 
113
 
116
#ifdef RCURL_DEBUG_MEMORY
114
#ifdef RCURL_DEBUG_MEMORY