Returns an error code to what the last error was. When this function is called the last error is cleared, so by calling this function it not only returns the last error, but it removes it, so if you were to call this function again, it would return no error
| 474 | // calling this function it not only returns the last error, but it removes it, so if you were to call this function |
| 475 | // again, it would return no error |
| 476 | int mod_GetLastError(void) { |
| 477 | // Clear out the errors |
| 478 | #if defined(WIN32) |
| 479 | SetLastError(0); |
| 480 | #elif defined(POSIX) |
| 481 | dlerror(); |
| 482 | #endif |
| 483 | int ret = ModLastError; |
| 484 | ModLastError = MODERR_NOERROR; |
| 485 | return ret; |
| 486 | } |
| 487 | |
| 488 | #if defined(POSIX) |
| 489 | #include <assert.h> |
no outgoing calls
no test coverage detected