src/file/SDL_rwops.c
changeset 1202 0748fbb272e7
parent 1078 e2ef6b7001fd
child 1269 905d5b482f2a
equal deleted inserted replaced
1201:718d00094f82 1202:0748fbb272e7
    72 	if ( context ) {
    72 	if ( context ) {
    73 		if ( context->hidden.stdio.autoclose ) {
    73 		if ( context->hidden.stdio.autoclose ) {
    74 			/* WARNING:  Check the return value here! */
    74 			/* WARNING:  Check the return value here! */
    75 			fclose(context->hidden.stdio.fp);
    75 			fclose(context->hidden.stdio.fp);
    76 		}
    76 		}
    77 		free(context);
    77 		SDL_FreeRW(context);
    78 	}
    78 	}
    79 	return(0);
    79 	return(0);
    80 }
    80 }
    81 
    81 
    82 /* Functions to read/write memory pointers */
    82 /* Functions to read/write memory pointers */
   143 	return(-1);
   143 	return(-1);
   144 }
   144 }
   145 static int mem_close(SDL_RWops *context)
   145 static int mem_close(SDL_RWops *context)
   146 {
   146 {
   147 	if ( context ) {
   147 	if ( context ) {
   148 		free(context);
   148 		SDL_FreeRW(context);
   149 	}
   149 	}
   150 	return(0);
   150 	return(0);
   151 }
   151 }
   152 
   152 
   153 /* Functions to create SDL_RWops structures from various data sources */
   153 /* Functions to create SDL_RWops structures from various data sources */