• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

krakjoe / ort / 16541322699

26 Jul 2025 03:35PM UTC coverage: 91.525% (-1.1%) from 92.601%
16541322699

push

github

krakjoe
fix a bunch of windows stuff, improve configure arguments

16 of 16 new or added lines in 1 file covered. (100.0%)

12 existing lines in 4 files now uncovered.

3672 of 4012 relevant lines covered (91.53%)

138189.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/env.c
1
/*
2
  +----------------------------------------------------------------------+
3
  | ort                                                                  |
4
  +----------------------------------------------------------------------+
5
  | Copyright (c) Joe Watkins 2025                                       |
6
  +----------------------------------------------------------------------+
7
  | This source file is subject to version 3.01 of the PHP license,      |
8
  | that is bundled with this package in the file LICENSE, and is        |
9
  | available through the world-wide-web at the following url:           |
10
  | http://www.php.net/license/3_01.txt                                  |
11
  | If you did not receive a copy of the PHP license and are unable to   |
12
  | obtain it through the world-wide-web, please send a note to          |
13
  | license@php.net so we can mail you a copy immediately.               |
14
  +----------------------------------------------------------------------+
15
  | Author: krakjoe                                                      |
16
  +----------------------------------------------------------------------+
17
 */
18
#include "ort.h"
19

20
#include "env.h"
21

22
#ifdef HAVE_ONNXRUNTIME
23
static OrtEnv* __php_ort_environment = NULL;
24

25
OrtEnv* php_ort_environment(void) {
26
    return __php_ort_environment;
27
}
28
#else
UNCOV
29
void* php_ort_environment(void) {
×
UNCOV
30
    return NULL;
×
31
}
32
#endif
33

34
PHP_MINIT_FUNCTION(ORT_ENV) 
2,784✔
35
{
36
#ifdef HAVE_ONNXRUNTIME
37
    return api->CreateEnv(
38
        ORT_LOGGING_LEVEL_WARNING, 
39
        "[ORT PHP]", &__php_ort_environment) ?
40
        FAILURE : SUCCESS;
41
#endif
42
    return SUCCESS;
2,784✔
43
}
44

45
PHP_MSHUTDOWN_FUNCTION(ORT_ENV) 
2,784✔
46
{
47
#ifdef HAVE_ONNXRUNTIME
48
    if (__php_ort_environment != NULL) {
49
        api->ReleaseEnv(
50
            __php_ort_environment);
51
    }
52
#endif
53
    return SUCCESS;
2,784✔
54
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc