Sha256: 27d024636615eaafd9412a51c4ae1d06a147b6749922bbae8d8e3f960507e73f

Contents?: true

Size: 818 Bytes

Versions: 2

Compression:

Stored size: 818 Bytes

Contents

/*
 * Copyright 2018 Uber Technologies, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifdef _MSC_VER
#include <malloc.h>
#define alloc_fn _alloca
#else
#include <alloca.h>
#define alloc_fn alloca
#endif

int main(void) {
    char* vla = alloc_fn(10);
    memset(vla, 0, 10);
    return 0;
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
h3-3.4.0 ext/h3/src/cmake/alloca_test.c
h3-3.3.1 ext/h3/src/cmake/alloca_test.c