com php-src: Wrap hrtime in `extern "c" {}`: ext/standard/hrtime.h

From: Date: Thu, 07 Nov 2019 13:41:58 +0000
Subject: com php-src: Wrap hrtime in `extern "c" {}`: ext/standard/hrtime.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-109214@lists.php.net to get a copy of this message
Commit: b9dfa12853c0f43ce76221d54cfd0568f674bac1 Author: Levi Morrison <levim@php.net> Wed, 6 Nov 2019 10:30:09 -0700 Committer: Nikita Popov <nikita.ppv@gmail.com> Thu, 7 Nov 2019 14:41:58 +0100 Parents: 6dcc0b859f5f31729ab3f1e776b067fb338b1978 Branches: PHP-7.3 PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b9dfa12853c0f43ce76221d54cfd0568f674bac1 Log: Wrap hrtime in extern "c" {} This allows it to be used by C++ extensions without them having to do their own forward declares. Closes GH-4890. Changed paths: M ext/standard/hrtime.h Diff: diff --git a/ext/standard/hrtime.h b/ext/standard/hrtime.h index c532845187e..1c08b075026 100644 --- a/ext/standard/hrtime.h +++ b/ext/standard/hrtime.h @@ -20,6 +20,8 @@ #ifndef HRTIME_H #define HRTIME_H +#include <Zend/zend_portability.h> + #define PHP_HRTIME_PLATFORM_POSIX 0 #define PHP_HRTIME_PLATFORM_WINDOWS 0 #define PHP_HRTIME_PLATFORM_APPLE 0 @@ -45,6 +47,8 @@ #define HRTIME_AVAILABLE (PHP_HRTIME_PLATFORM_POSIX || PHP_HRTIME_PLATFORM_WINDOWS || PHP_HRTIME_PLATFORM_APPLE || PHP_HRTIME_PLATFORM_HPUX || PHP_HRTIME_PLATFORM_AIX) +BEGIN_EXTERN_C() + typedef uint64_t php_hrtime_t; PHPAPI php_hrtime_t php_hrtime_current(void); @@ -53,4 +57,6 @@ PHP_MINIT_FUNCTION(hrtime); PHP_FUNCTION(hrtime); +END_EXTERN_C() + #endif /* HRTIME_H */

« previous php.cvs (#109214) next »