The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
971 B
35 lines
971 B
8 years ago
|
/* Copyright © 2017 Dylan Baker
|
||
|
*
|
||
|
* 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.
|
||
|
*/
|
||
|
#include <vector>
|
||
8 years ago
|
|
||
|
const int cnums[] = {0, 61};
|
||
|
|
||
6 years ago
|
/* Provided by foobar.c */
|
||
|
extern "C" int get_number_index (void);
|
||
|
|
||
8 years ago
|
template<typename T, int N>
|
||
|
std::vector<T> makeVector(const T (&data)[N])
|
||
|
{
|
||
|
return std::vector<T>(data, data+N);
|
||
|
}
|
||
8 years ago
|
|
||
|
namespace {
|
||
8 years ago
|
std::vector<int> numbers = makeVector(cnums);
|
||
8 years ago
|
}
|
||
|
|
||
|
extern "C" int six_one(void) {
|
||
6 years ago
|
return numbers[get_number_index ()];
|
||
8 years ago
|
}
|