ensure name of a mutex is a string

This commit is contained in:
Tom Tromey 2012-08-19 03:26:09 -06:00
parent 977c4aa65f
commit 3cbf5b1d3b

View file

@ -185,6 +185,9 @@ informational only. */)
struct Lisp_Mutex *mutex;
Lisp_Object result;
if (!NILP (name))
CHECK_STRING (name);
mutex = ALLOCATE_PSEUDOVECTOR (struct Lisp_Mutex, mutex, PVEC_MUTEX);
memset ((char *) mutex + offsetof (struct Lisp_Mutex, mutex),
0, sizeof (struct Lisp_Mutex) - offsetof (struct Lisp_Mutex,