under Windows) - fix from Ben Mansell
if (!thread_resources) {
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
- return ts_resource(id);
+ return ts_resource_ex(id, &thread_id);
/* thread_resources = tsrm_tls_table[hash_value]; */
} else {
do {
thread_resources = thread_resources->next;
} else {
allocate_new_resource(&thread_resources->next, thread_id);
- return ts_resource(id);
+ return ts_resource_ex(id, &thread_id);
/*
* thread_resources = thread_resources->next;
* break;