dtoa.c: make thread-safe by using atomic CAS

This commit is contained in:
Nobuyoshi Nakada 2021-01-10 17:36:18 +09:00
parent 34d02631e7
commit 2adbf01ae1
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2021-01-10 20:00:20 +09:00
3 changed files with 57 additions and 21 deletions

1
util.c
View file

@ -29,6 +29,7 @@
#include "internal/sanitizers.h"
#include "internal/util.h"
#include "ruby/util.h"
#include "ruby_atomic.h"
const char ruby_hexdigits[] = "0123456789abcdef0123456789ABCDEF";
#define hexdigit ruby_hexdigits