Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos throughout the source code #11818

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion std/Std.hx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ extern class Std {

Leading whitespaces are ignored.

`x` may optionally start with a + or - to denote a postive or negative value respectively.
`x` may optionally start with a + or - to denote a positive or negative value respectively.

If the optional sign is followed 0x or 0X, hexadecimal notation is recognized where the following
digits may contain 0-9 and A-F. Both the prefix and digits are case insensitive.
Expand Down
2 changes: 1 addition & 1 deletion std/String.hx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ extern class String {
is performed within `this` String. In either case, the returned position
is relative to the beginning of `this` String.

If `startIndex` is negative, the result is unspecifed.
If `startIndex` is negative, the result is unspecified.

If `str` cannot be found, -1 is returned.
**/
Expand Down
2 changes: 1 addition & 1 deletion std/Sys.hx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ extern class Sys {
static function sleep(seconds:Float):Void;

/**
Changes the current time locale, which will affect `DateTools.format` date formating.
Changes the current time locale, which will affect `DateTools.format` date formatting.
Returns `true` if the locale was successfully changed.
**/
static function setTimeLocale(loc:String):Bool;
Expand Down
2 changes: 1 addition & 1 deletion std/Xml.hx
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class Xml {

/**
Removes a child from the Document or Element.
Returns true if the child was successfuly removed.
Returns true if the child was successfully removed.
**/
public function removeChild(x:Xml):Bool {
ensureElementType();
Expand Down
2 changes: 1 addition & 1 deletion std/cpp/cppia/HostClasses.hx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class HostClasses {
externs.set("haxe._Int64.___Int64", true);
externs.set("haxe._Int32.Int32_Impl_", true);
externs.set("haxe._Int32.___Int32", true);
// Hidded in implementation classes
// Hidden in implementation classes
// externs.set("sys.db.RecordType",true);
externs.set("sys.net._Socket.SocketInput", true);
externs.set("sys.net._Socket.SocketOutput", true);
Expand Down
2 changes: 1 addition & 1 deletion std/cpp/net/ThreadServer.hx
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class ThreadServer<Client, Message> {
}

/**
Called when a message has been recieved. Message handling code should go here.
Called when a message has been received. Message handling code should go here.
**/
public dynamic function clientMessage(c:Client, msg:Message) {}

Expand Down
2 changes: 1 addition & 1 deletion std/cpp/vm/Debugger.hx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Debugger {
Sets the handler callback to be made when asynchronous events occur,
specifically, when threads are created, terminated, started, or
stopped. The calling thread becomes the "debugger" thread, which means
that it will be discluded from any breakpoints and will not be reported
that it will be excluded from any breakpoints and will not be reported
on by any thread reporting requests.

Be aware that this callback is made asynchronously and possibly by
Expand Down
6 changes: 3 additions & 3 deletions std/eval/luv/File.hx
Original file line number Diff line number Diff line change
Expand Up @@ -296,17 +296,17 @@ enum abstract FileSymlinkFlag(Int) {
static public function realPath(loop:Loop, path:NativeString, ?request:FileRequest, callback:(result:Result<NativeString>)->Void):Void;

/**
Changes owneship of the file at the given path.
Changes ownership of the file at the given path.
**/
static public function chown(loop:Loop, path:NativeString, uid:Int, gid:Int, ?request:FileRequest, callback:(result:Result<Result.NoData>)->Void):Void;

/**
Changes owneship of the file at the given path. without dereferencing symlinks.
Changes ownership of the file at the given path. without dereferencing symlinks.
**/
static public function lchown(loop:Loop, path:NativeString, uid:Int, gid:Int, ?request:FileRequest, callback:(result:Result<Result.NoData>)->Void):Void;

/**
Changes owneship of the file.
Changes ownership of the file.
**/
public function fchown(loop:Loop, uid:Int, gid:Int, ?request:FileRequest, callback:(result:Result<Result.NoData>)->Void):Void;

Expand Down
2 changes: 1 addition & 1 deletion std/eval/luv/Pipe.hx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ enum ReceiveHandle {
calls its callback, there may be file descriptors in the pipe, in addition
to the ordinary data provided to the callback.

To check, call this function `eval.luv.Pipe.recieveHandle` in a loop until
To check, call this function `eval.luv.Pipe.receiveHandle` in a loop until
it returns `NONE`. Each time it returns `TCP(associate)` or `PIPE(associate)`,
create an appropriate handle using either `eval.luv.TCP.init` or `eval.uv.Pipe.init`,
and call `associate` to receive the file descriptor and associate it with handle.
Expand Down
2 changes: 1 addition & 1 deletion std/eval/vm/Gc.hx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ typedef Control = {
var major_heap_increment:Int;

/**
The major GC speed is computed from this parameter. This is the memory that will be "wasted" because the GC does not immediatly collect unreachable blocks. It is expressed as a percentage of the memory used for live data. The GC will work more (use more CPU time and collect blocks more eagerly) if space_overhead is smaller. Default: 80.
The major GC speed is computed from this parameter. This is the memory that will be "wasted" because the GC does not immediately collect unreachable blocks. It is expressed as a percentage of the memory used for live data. The GC will work more (use more CPU time and collect blocks more eagerly) if space_overhead is smaller. Default: 80.
**/
var space_overhead:Int;

Expand Down
2 changes: 1 addition & 1 deletion std/flash/AnyType.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package flash;

/**
This type represents the Flash `*` type, which is
actually the absense of type. It can be used as a
actually the absence of type. It can be used as a
type parameter for `flash.Vector` to represent the
native `Vector.<*>` type.
**/
Expand Down
2 changes: 1 addition & 1 deletion std/haxe/Int64.hx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ abstract Int64(__Int64) from __Int64 to __Int64 {
}

/**
Performs signed integer divison of `dividend` by `divisor`.
Performs signed integer division of `dividend` by `divisor`.
Returns `{ quotient : Int64, modulus : Int64 }`.
**/
public static function divMod(dividend:Int64, divisor:Int64):{quotient:Int64, modulus:Int64} {
Expand Down
4 changes: 2 additions & 2 deletions std/haxe/Int64Helper.hx
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class Int64Helper {

var noFractions = f - (f % 1);

// 2^53-1 and -2^53+1: these are parseable without loss of precision.
// In theory 2^53 and -2^53 are parseable too, but then there's no way to
// 2^53-1 and -2^53+1: these are parsable without loss of precision.
// In theory 2^53 and -2^53 are parsable too, but then there's no way to
// distinguish 2^53 from 2^53+1
// (i.e. trace(9007199254740992. + 1. > 9007199254740992.); // false!)
if (noFractions > 9007199254740991) {
Expand Down
2 changes: 1 addition & 1 deletion std/haxe/atomic/AtomicInt.hx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract AtomicInt {
public function add(b:Int):Int;

/**
Atomically substracts `b` from `a`.
Atomically subtracts `b` from `a`.
Returns the original value of `a`.
**/
public function sub(b:Int):Int;
Expand Down
4 changes: 2 additions & 2 deletions std/haxe/display/Display.hx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ enum abstract ClassFieldOriginKind<T>(Int) {

/**
The field is declared on a parent type, such as:
- a super class field that is not overriden
- a super class field that is not overridden
- a forwarded abstract field
**/
var Parent:ClassFieldOriginKind<JsonModuleType<T>>;
Expand Down Expand Up @@ -508,7 +508,7 @@ enum abstract FindReferencesKind(String) to String {
var Direct = "direct";

/**
Find references to the base field and all the overidding fields in the inheritance chain.
Find references to the base field and all the overriding fields in the inheritance chain.
**/
var WithBaseAndDescendants = "withBaseAndDescendants";

Expand Down
2 changes: 1 addition & 1 deletion std/haxe/hxb/WriterConfig.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ typedef WriterTargetConfig = {
var ?generate:Null<Bool>;

/**
Dot paths of modules or packages to be exluded from the archive.
Dot paths of modules or packages to be excluded from the archive.
**/
var ?exclude:Null<Array<String>>;

Expand Down
2 changes: 1 addition & 1 deletion std/haxe/io/Error.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ package haxe.io;
@:keep
#end
enum Error {
/** The IO is set into nonblocking mode and some data cannot be read or written **/
/** The IO is set into non-blocking mode and some data cannot be read or written **/
Blocked;

/** An integer value is outside its allowed range **/
Expand Down
2 changes: 1 addition & 1 deletion std/haxe/macro/Compiler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ class Compiler {
}

/**
Register a custom medatada for documentation and completion purposes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol metatada...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My hands keep making that one, have to type it 2 or 3 times to get it right x_x

Register a custom metadata for documentation and completion purposes
**/
public static function registerCustomMetadata(meta:MetadataDescription, ?source:String):Void {
#if (neko || eval)
Expand Down
2 changes: 1 addition & 1 deletion std/haxe/macro/Context.hx
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ class Context {
is done running initialization macros, when typing begins.

`onAfterInitMacros` should be used to delay typer-dependant code from
your initalization macros, to properly separate configuration phase and
your initialization macros, to properly separate configuration phase and
actual typing.
**/
public static function onAfterInitMacros(callback:Void->Void):Void {
Expand Down
2 changes: 1 addition & 1 deletion std/haxe/macro/Expr.hx
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ typedef Var = {
var ?isStatic:Bool;

/**
Metadata associatied with the variable, if available.
Metadata associated with the variable, if available.
**/
var ?meta:Metadata;
}
Expand Down
2 changes: 1 addition & 1 deletion std/haxe/macro/JSGenApi.hx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ typedef JSGenApi = {
/** create the metadata expression for the given type **/
function buildMetaData(t:BaseType):Null<TypedExpr>;

/** select the current classe **/
/** select the current class **/
function setCurrentClass(c:ClassType):Void;
}
4 changes: 2 additions & 2 deletions std/js/Syntax.hx
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ extern class Syntax {
@:pure static function typeof(o:Dynamic):String;

/**
Genearte `a === b` expression.
Generate `a === b` expression.
**/
@:pure static function strictEq(a:Dynamic, b:Dynamic):Bool;

/**
Genearte `a !== b` expression.
Generate `a !== b` expression.
**/
@:pure static function strictNeq(a:Dynamic, b:Dynamic):Bool;

Expand Down
6 changes: 3 additions & 3 deletions std/js/lib/intl/PluralRules.hx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extern class PluralRules {
@:pure function resolvedOptions():PluralRulesResolvedOptions;

/**
Returns a String indicating which plurar rule to use for locale-aware formatting.
Returns a String indicating which plural rule to use for locale-aware formatting.
**/
@:pure function select(number:Int):String;

Expand Down Expand Up @@ -105,12 +105,12 @@ typedef PluralRulesResolvedOptions = {

enum abstract PluralRulesType(String) {
/**
For cardinal numbers (refering to the quantity of things).
For cardinal numbers (referring to the quantity of things).
*/
var Cardinal = "cardinal";

/**
For ordinal number (refering to the ordering or ranking of things, e.g. "1st", "2nd", "3rd" in English).
For ordinal number (referring to the ordering or ranking of things, e.g. "1st", "2nd", "3rd" in English).
*/
var Ordinal = "ordinal";
}
Expand Down
4 changes: 2 additions & 2 deletions std/neko/vm/Module.hx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Module {
}

/**
Each Module has an export table which can be useful to transfert
Each Module has an export table which can be useful to transfer
values between modules.
**/
public function getExports():Map<String, Dynamic> {
Expand Down Expand Up @@ -157,7 +157,7 @@ class Module {
}

/**
Reads a module from a name and using the specified seach path and loader.
Reads a module from a name and using the specified search path and loader.
The module is initialized but has not yet been executed.
**/
public static function readPath(name:String, path:Array<String>, loader:Loader) {
Expand Down
2 changes: 1 addition & 1 deletion std/php/ErrorException.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ package php;
**/
@:native('ErrorException')
extern class ErrorException implements Throwable {
function new(?message:String, ?code:Int, ?severety:Int, ?filename:String, ?lineno:Int, ?previous:Throwable):Void;
function new(?message:String, ?code:Int, ?severity:Int, ?filename:String, ?lineno:Int, ?previous:Throwable):Void;

final function getSeverity():Int;
final function getPrevious():Throwable; // Returns previous Throwable
Expand Down
2 changes: 1 addition & 1 deletion std/php/Syntax.hx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ extern class Syntax {

/**
```haxe
Syntax.assocDecl({field1:'first', field2:2}});
Syntax.assocDecl({field1:'first', field2:2});
```
Generates native associative array declaration:
```haxe
Expand Down
4 changes: 2 additions & 2 deletions std/python/lib/Os.hx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ extern class Os {
static var sep(default, null):String;
static var pathsep(default, null):String;

static function makedirs(path:String, mode:Int = 511 /* Oktal 777 */, exist_ok:Bool = false):Void;
static function makedirs(path:String, mode:Int = 511 /* Octal 777 */, exist_ok:Bool = false):Void;

static function mkdir(path:String, mode:Int = 511 /* Oktal 777 */):Void;
static function mkdir(path:String, mode:Int = 511 /* Octal 777 */):Void;
}
2 changes: 1 addition & 1 deletion std/python/lib/net/Address.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@

package python.lib.net;

@:deprecated("Use python.lib.socket.Adress instead")
@:deprecated("Use python.lib.socket.Address instead")
typedef Address = python.lib.socket.Address;
2 changes: 1 addition & 1 deletion std/sys/ssl/Socket.hx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extern class Socket extends sys.net.Socket {
function setCertificate(cert:Certificate, key:Key):Void;

/**
Configure additionals certificates and private keys for Server Name Indication extension.
Configure additional certificates and private keys for Server Name Indication extension.
The callback may be called during handshake to determine the certificate to use.
**/
function addSNICertificate(cbServernameMatch:String->Bool, cert:Certificate, key:Key):Void;
Expand Down
2 changes: 1 addition & 1 deletion std/sys/thread/ElasticThreadPool.hx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class ElasticThreadPool implements IThreadPool {

/**
Initiates a shutdown.
All previousely submitted tasks will be executed, but no new tasks will
All previously submitted tasks will be executed, but no new tasks will
be accepted.

Multiple calls to this method have no effect.
Expand Down
2 changes: 1 addition & 1 deletion std/sys/thread/FixedThreadPool.hx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class FixedThreadPool implements IThreadPool {

/**
Initiates a shutdown.
All previousely submitted tasks will be executed, but no new tasks will
All previously submitted tasks will be executed, but no new tasks will
be accepted.

Multiple calls to this method have no effect.
Expand Down
2 changes: 1 addition & 1 deletion std/sys/thread/IThreadPool.hx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface IThreadPool {

/**
Initiates a shutdown.
All previousely submitted tasks will be executed, but no new tasks will
All previously submitted tasks will be executed, but no new tasks will
be accepted.

Multiple calls to this method have no effect.
Expand Down
2 changes: 1 addition & 1 deletion std/sys/thread/Semaphore.hx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package sys.thread;
Try to lock the semaphore.
If the value of the semaphore is zero, `false` is returned, else the value is increased.

If `timeout` is specified, this function will block until the thread is able to acquire the semaphore, or the timout expires.
If `timeout` is specified, this function will block until the thread is able to acquire the semaphore, or the timeout expires.
`timeout` is in seconds.
**/
public function tryAcquire(?timeout:Float):Bool;
Expand Down
Loading