]> granicus.if.org Git - php/commitdiff
Rename the recently introduced Sysvsem class to SysvSemaphore
authorMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 7 May 2020 08:21:44 +0000 (10:21 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 7 May 2020 08:21:58 +0000 (10:21 +0200)
UPGRADING
ext/sysvsem/sysvsem.c
ext/sysvsem/sysvsem.stub.php
ext/sysvsem/sysvsem_arginfo.h

index 00f7b88f1b34eea6ecd9864785dbed779af6fb6d..84b345ff9cf228e6bccfc8ea16dc5981499eddcd 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -417,7 +417,7 @@ PHP 8.0 UPGRADE NOTES
     locale component from the default.
 
 - Sysvsem:
-  . sem_get() will now return an Sysvsem object rather than a resource.
+  . sem_get() will now return an SysvSemaphore object rather than a resource.
     Return value checks using is_resource() should be replaced with checks
     for `false`.
 
index df9f62116f4af5676b7a86d7d18f00d77aa34ab9..7422c64354ab8faba65dcdbe1d147ffb6ca8fd2a 100644 (file)
@@ -86,7 +86,7 @@ ZEND_GET_MODULE(sysvsem)
 #define SYSVSEM_USAGE  1
 #define SYSVSEM_SETVAL 2
 
-/* Sysvsem class */
+/* SysvSemaphore class */
 
 zend_class_entry *sysvsem_ce;
 static zend_object_handlers sysvsem_object_handlers;
@@ -108,7 +108,7 @@ static zend_object *sysvsem_create_object(zend_class_entry *class_type) {
 }
 
 static zend_function *sysvsem_get_constructor(zend_object *object) {
-       zend_throw_error(NULL, "Cannot directly construct Sysvsem, use sem_get() instead");
+       zend_throw_error(NULL, "Cannot directly construct SysvSemaphore, use sem_get() instead");
        return NULL;
 }
 
@@ -154,7 +154,7 @@ static void sysvsem_free_obj(zend_object *object)
 PHP_MINIT_FUNCTION(sysvsem)
 {
        zend_class_entry ce;
-       INIT_CLASS_ENTRY(ce, "Sysvsem", class_Sysvsem_methods);
+       INIT_CLASS_ENTRY(ce, "SysvSemaphore", class_SysvSemaphore_methods);
        sysvsem_ce = zend_register_internal_class(&ce);
        sysvsem_ce->ce_flags |= ZEND_ACC_FINAL;
        sysvsem_ce->create_object = sysvsem_create_object;
@@ -187,7 +187,7 @@ PHP_MINFO_FUNCTION(sysvsem)
 #undef SETVAL_WANTS_PTR
 #endif
 
-/* {{{ proto Sysvsem sem_get(int key [, int max_acquire [, int perm [, int auto_release]])
+/* {{{ proto SysvSemaphore sem_get(int key [, int max_acquire [, int perm [, int auto_release]])
    Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously */
 PHP_FUNCTION(sem_get)
 {
@@ -341,7 +341,7 @@ static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire)
 }
 /* }}} */
 
-/* {{{ proto bool sem_acquire(Sysvsem id)
+/* {{{ proto bool sem_acquire(SysvSemaphore id)
    Acquires the semaphore with the given id, blocking if necessary */
 PHP_FUNCTION(sem_acquire)
 {
@@ -349,7 +349,7 @@ PHP_FUNCTION(sem_acquire)
 }
 /* }}} */
 
-/* {{{ proto bool sem_release(Sysvsem id)
+/* {{{ proto bool sem_release(SysvSemaphore id)
    Releases the semaphore with the given id */
 PHP_FUNCTION(sem_release)
 {
@@ -357,7 +357,7 @@ PHP_FUNCTION(sem_release)
 }
 /* }}} */
 
-/* {{{ proto bool sem_remove(Sysvsem id)
+/* {{{ proto bool sem_remove(SysvSemaphore id)
    Removes semaphore from Unix systems */
 
 /*
index e6fe1b4b7d8cfb67fea1b5d152b18f4b1b70e2a0..095720df601036608e8bfbbab9c18dbc690107c0 100644 (file)
@@ -2,17 +2,17 @@
 
 /** @generate-function-entries */
 
-final class Sysvsem
+final class SysvSemaphore
 {
 }
 
 /**
  * @todo use bool for $auto_release
  */
-function sem_get(int $key, int $max_acquire = 1, int $perm = 0666, int $auto_release = 1): Sysvsem|false {}
+function sem_get(int $key, int $max_acquire = 1, int $perm = 0666, int $auto_release = 1): SysvSemaphore|false {}
 
-function sem_acquire(Sysvsem $sem_identifier, bool $nowait = false): bool {}
+function sem_acquire(SysvSemaphore $semaphore, bool $nowait = false): bool {}
 
-function sem_release(Sysvsem $sem_identifier): bool {}
+function sem_release(SysvSemaphore $semaphore): bool {}
 
-function sem_remove(Sysvsem $sem_identifier): bool {}
+function sem_remove(SysvSemaphore $semaphore): bool {}
index 83948fed3f7894157d95f97e2e5a145dc1d817e4..d1500b81b632958729bd5c9c2b346028179a627f 100644 (file)
@@ -1,6 +1,6 @@
 /* This is a generated file, edit the .stub.php file instead. */
 
-ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_sem_get, 0, 1, Sysvsem, MAY_BE_FALSE)
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_sem_get, 0, 1, SysvSemaphore, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_acquire, IS_LONG, 0, "1")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, perm, IS_LONG, 0, "0666")
@@ -8,12 +8,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_sem_get, 0, 1, Sysvsem, MAY_
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sem_acquire, 0, 1, _IS_BOOL, 0)
-       ZEND_ARG_OBJ_INFO(0, sem_identifier, Sysvsem, 0)
+       ZEND_ARG_OBJ_INFO(0, semaphore, SysvSemaphore, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nowait, _IS_BOOL, 0, "false")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sem_release, 0, 1, _IS_BOOL, 0)
-       ZEND_ARG_OBJ_INFO(0, sem_identifier, Sysvsem, 0)
+       ZEND_ARG_OBJ_INFO(0, semaphore, SysvSemaphore, 0)
 ZEND_END_ARG_INFO()
 
 #define arginfo_sem_remove arginfo_sem_release
@@ -34,6 +34,6 @@ static const zend_function_entry ext_functions[] = {
 };
 
 
-static const zend_function_entry class_Sysvsem_methods[] = {
+static const zend_function_entry class_SysvSemaphore_methods[] = {
        ZEND_FE_END
 };