mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
More sprintf -> PyOS_snprintf.
This commit is contained in:
parent
179c48c60e
commit
75cdad5584
5 changed files with 14 additions and 9 deletions
|
@ -123,7 +123,8 @@ long PyThread_start_new_thread( void (*func)(void *), void *arg )
|
|||
|
||||
/* We are so very thread-safe... */
|
||||
this_thread = atomic_add( &thread_count, 1 );
|
||||
sprintf( name, "python thread (%d)", this_thread );
|
||||
PyOS_snprintf(name, sizeof(name),
|
||||
"python thread (%d)", this_thread );
|
||||
|
||||
tid = spawn_thread( (thread_func)func, name,
|
||||
B_NORMAL_PRIORITY, arg );
|
||||
|
@ -222,7 +223,7 @@ PyThread_type_lock PyThread_allocate_lock( void )
|
|||
}
|
||||
|
||||
this_lock = atomic_add( &lock_count, 1 );
|
||||
sprintf( name, "python lock (%d)", this_lock );
|
||||
PyOS_snprintf(name, sizeof(name), "python lock (%d)", this_lock);
|
||||
|
||||
retval = benaphore_create( name, lock );
|
||||
if( retval != EOK ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue