pike.git/
src/
modules/
Wnotify/
wnotify.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2015-05-19
2015-05-19 19:38:27 by Martin Nilsson <nilsson@opera.com>
ca0271131140eac4c8aaf4f05b53a506a121835d (
18
lines) (+
9
/-
9
)
[
Show
|
Annotate
]
Branch:
8.1
realloc -> xrealloc
1:
+
/* -*- c -*-
+
|| This file is part of Pike. For copyright information see COPYRIGHT.
+
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
+
|| for more information.
+
*/
+
/*! @module System */
148:
int s, n; struct array * ph; HANDLE nh;
-
HANDLE * handles;
+
h = get_storage(handle, Wnotify_NotificationHandle_program); if(!h) {
164:
{ s = n = THIS->handles_size || 1; s*=2;
-
handles =
realloc
(THIS->handles, sizeof(HANDLE) * s);
-
if(!handles)
-
{
-
pop_stack();
-
Pike_error("add_handle: failed to allocate memory.\n");
+
THIS->
handles =
xrealloc
(THIS->handles, sizeof(HANDLE) * s);
}
-
THIS->handles = handles;
-
}
-
+
THIS->handles[THIS->handles_used++] = nh; pop_stack();