Files
php-src/ext/intl/breakiterator/codepointiterator_methods.cpp
Gina Peter Banyard 1cb9d87ee5 intl: use C++ linkage instead of C linkage when easily possible
intl: use C++ linkage for BreakIterator PHP functions/methods

intl: use C++ linkage for common code

intl: use C++ linkage for Spoofchecker PHP methods

intl: use C++ linkage for IntlNumberRangeFormatter PHP methods

intl: use C++ linkage for IntlNumberFormatter PHP methods

intl: No need to extern C the arginfo header for IntlListFormatter

intl: use C++ linkage for resourcebundle_get_iterator

Closes GH-24625
2026-10-24 15:43:26 +01:00

37 lines
1.3 KiB
C++

/*
+----------------------------------------------------------------------+
| Copyright © The PHP Group and Contributors. |
+----------------------------------------------------------------------+
| This source file is subject to the Modified BSD License that is |
| bundled with this package in the file LICENSE, and is available |
| through the World Wide Web at <https://www.php.net/license/>. |
| |
| SPDX-License-Identifier: BSD-3-Clause |
+----------------------------------------------------------------------+
| Authors: Gustavo Lopes <cataphract@php.net> |
+----------------------------------------------------------------------+
*/
#include "codepointiterator_internal.h"
#define USE_BREAKITERATOR_POINTER 1
#include "breakiterator_class.h"
using PHP::CodePointBreakIterator;
static inline CodePointBreakIterator *fetch_cpbi(BreakIterator_object *bio) {
return (CodePointBreakIterator*)bio->biter;
}
PHP_METHOD(IntlCodePointBreakIterator, getLastCodePoint)
{
BREAKITER_METHOD_INIT_VARS;
object = ZEND_THIS;
ZEND_PARSE_PARAMETERS_NONE();
BREAKITER_METHOD_FETCH_OBJECT;
RETURN_LONG(fetch_cpbi(bio)->getLastCodePoint());
}