Files
swift-mirror/include/swift-c/CommonString/CommonString.h
Artem Chikin d24e15812b Build libSwiftStaticMirror as a standalone library with minimal required dependencies.
This separates it from `libSwiftScan` and allows us to build this library without building much of the rest of the compiler.

Also refactor `utils/build-parser-lib` into `utils/build-tooling-libs` which builds both SwiftSyntaxParser and SwiftStaticMirror.
2022-02-09 12:28:21 -08:00

36 lines
1.1 KiB
C

//===--- CommonString.h - C API for Swift Dependency Scanning ---*- C -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_C_LIB_SWIFT_COMMON_STRING_H
#define SWIFT_C_LIB_SWIFT_COMMON_STRING_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
/**
* A character string used to pass around dependency scan result metadata.
* Lifetime of the string is strictly tied to the object whose field it
* represents. When the owning object is released, string memory is freed.
*/
typedef struct {
const void *data;
size_t length;
} swiftscan_string_ref_t;
typedef struct {
swiftscan_string_ref_t *strings;
size_t count;
} swiftscan_string_set_t;
#endif // SWIFT_C_LIB_SWIFT_COMMON_STRING_H