1f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams/*
2f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams * Copyright (C) 2013 The Android Open Source Project
3f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams *
4f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams * Licensed under the Apache License, Version 2.0 (the "License");
5f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams * you may not use this file except in compliance with the License.
6f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams * You may obtain a copy of the License at
7f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams *
8f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams *      http://www.apache.org/licenses/LICENSE-2.0
9f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams *
10f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams * Unless required by applicable law or agreed to in writing, software
11f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams * distributed under the License is distributed on an "AS IS" BASIS,
12f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams * See the License for the specific language governing permissions and
14f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams * limitations under the License.
15f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams */
16f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams
17574854bcb2eb25a85b9b52faf2fb3e743fa7aa14Stephen Hines#include "rsUtils.h"
18f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams#include "rsCppUtils.h"
19f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams
20f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Samsnamespace android {
21f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Samsnamespace renderscript {
22f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams
23f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Samsconst char * rsuCopyString(const char *name) {
24f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams    return rsuCopyString(name, strlen(name));
25f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams}
26f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams
27f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Samsconst char * rsuCopyString(const char *name, size_t len) {
28f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams    char *n = new char[len+1];
29f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams    memcpy(n, name, len);
30f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams    n[len] = 0;
31f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams    return n;
32f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams}
33f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams
34f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams
35f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams}
36f313dc32d5ea68a7c48fb4ec6e131ec2fb97ce2dJason Sams}
37