Skip to content

Instantly share code, notes, and snippets.

View cheatfate's full-sized avatar

Eugene Kabanov cheatfate

View GitHub Profile
type
AbstractDispatcher = ref object of RootObj
AbstractTimer = ref object of RootObj
method read*(fd: int, data: View, callback: Callback) = discard
method read*(fd: int, data: View, callback: Callback) = discard
method recvfrom*(fd: int, data: View, address: var InetAddress, callback: Callback) = discard
method send*(fd: int, data: View, callback: Callback) = discard
method sendto*(fd: int, address: InetAddress, data: View, callback: Callback) = discard
When partners can't agree
Their dealings come to naught
And trouble is their labor's only fruit.
____________
Once Crawfish, Swan and Pike
Set out to pull a loaded cart,
And all together settled in the traces;
They pulled with all their might, but still the cart refused to budge!
The load it seemed was not too much for them:
StmtList
ProcDef
Ident !"uuid"
Empty
Empty
FormalParams
Sym "GUID"
IdentDefs
Sym "x"
Call
import wincom, strutils
type
FILETIME = object
dwLowDateTime: DWORD
dwHighDateTime: DWORD
LPFILETIME = ptr FILETIME
const
CLSID_SetupConfiguration = DEFGUID("177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D")
I:\Nim\tests\threads>nim c --cc:vcc tracy_allocator
Hint: used config file 'I:\Nim\config\nim.cfg' [Conf]
Hint: used config file 'I:\Nim\tests\threads\nim.cfg' [Conf]
Hint: system [Processing]
Hint: tracy_allocator [Processing]
CC: compiler_tracy_allocator
CC: stdlib_system
CC: stdlib_sharedlist
CC: stdlib_locks
"C:\WINDOWS\system32\cmd.exe" /C ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall" amd64 && SET"
N_NOCONV(void, deallocShared_RCjNtRnHdRYntrcE7YtwWw_2)(void* p) {
nimfr_("deallocShared", "alloc.nim")
nimln_(824, "alloc.nim");
EnterCriticalSection((&heapLock_Cm9aJxbMhUuv7Cj8trffHQw));
nimln_(825, "alloc.nim");
dealloc_jqYVOi4APb9cRx3G9a57AkRw((&sharedHeap_R3bhvQCN0d6AYpkvxfT9aGw), p);
nimln_(826, "alloc.nim");
LeaveCriticalSection((&heapLock_Cm9aJxbMhUuv7Cj8trffHQw));
popFrame();
}
static N_INLINE(NI, atomicInc_z4A2GBHreJM5Dq9aEBQ9cQUQsystem)(NI* memLoc, NI x) {
NI result;
result = (NI)0;
result = _InterlockedExchangeAdd(memLoc, x);
return result;
}
static N_INLINE(NI, atomicDec_z4A2GBHreJM5Dq9aEBQ9cQUQ_2system)(NI* memLoc, NI x) {
NI result;
result = (NI)0;
when hostOS == "windows":
const
MAXIMUM_WAIT_OBJECTS = 64
MAXIMUM_WAIT_THREADS = MAXIMUM_WAIT_OBJECTS * MAXIMUM_WAIT_OBJECTS
type
WaitChunk = object
events: array[MAXIMUM_WAIT_OBJECTS, SysThread]
count: int
<html>
<head>
<title>Test results</title>
<style type="text/css">
<!--/* ==== Scroll down to find where to put your styles :) ==== */
/* HTML5 ✰ Boilerplate */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
FAIL: twrongexc.nim
Test "tests/exception/twrongexc.nim" in category "exception"
Failure: reExitcodesDiffer
Expected:
exitcode: 1
Gotten:
exitcode: 0
Output: